aboutsummaryrefslogtreecommitdiffstats
path: root/lib/python/qmk/tests/test_qmk_keymap.py
diff options
context:
space:
mode:
authorErovia <Erovia@users.noreply.github.com>2020-05-26 17:43:33 +0200
committerGitHub <noreply@github.com>2020-05-26 17:43:33 +0200
commit6501377070ff20bd061ea85c7ae5517652b6478b (patch)
tree5dd31794e887b98da40ed647405452a85c852f08 /lib/python/qmk/tests/test_qmk_keymap.py
parentaf2ca136045c0157c5c093fb902dccacd9fa0e32 (diff)
downloadfirmware-6501377070ff20bd061ea85c7ae5517652b6478b.tar.gz
firmware-6501377070ff20bd061ea85c7ae5517652b6478b.tar.bz2
firmware-6501377070ff20bd061ea85c7ae5517652b6478b.zip
CLI: fix `json2c` subcommand and add/fix tests (#9206)
Co-authored-by: Zach White <skullydazed@users.noreply.github.com>
Diffstat (limited to 'lib/python/qmk/tests/test_qmk_keymap.py')
-rw-r--r--lib/python/qmk/tests/test_qmk_keymap.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/python/qmk/tests/test_qmk_keymap.py b/lib/python/qmk/tests/test_qmk_keymap.py
index 2db625600..d8669e549 100644
--- a/lib/python/qmk/tests/test_qmk_keymap.py
+++ b/lib/python/qmk/tests/test_qmk_keymap.py
@@ -8,12 +8,12 @@ def test_template_onekey_proton_c():
def test_template_onekey_pytest():
templ = qmk.keymap.template('handwired/onekey/pytest')
- assert templ == 'const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {__KEYMAP_GOES_HERE__};\n'
+ assert templ == '#include QMK_KEYBOARD_H\nconst uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {__KEYMAP_GOES_HERE__};\n'
def test_generate_onekey_pytest():
templ = qmk.keymap.generate('handwired/onekey/pytest', 'LAYOUT', [['KC_A']])
- assert templ == 'const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT(KC_A)};\n'
+ assert templ == '#include QMK_KEYBOARD_H\nconst uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {\t[0] = LAYOUT(KC_A)};\n'
# FIXME(skullydazed): Add a test for qmk.keymap.write that mocks up an FD.