summaryrefslogtreecommitdiff
path: root/lib/python/qmk/tests/test_cli_commands.py
diff options
context:
space:
mode:
authorErovia <Erovia@users.noreply.github.com>2020-05-26 17:43:33 +0200
committerDrashna Jael're <drashna@live.com>2020-08-08 20:29:03 -0700
commit5ea1cd3526ff49ef61cbe728409782994b83bf1b (patch)
treedaef51d92dbe6cea37defb368c2800223284470d /lib/python/qmk/tests/test_cli_commands.py
parent4db676c64d5384b75342b786a82c068145d132db (diff)
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_cli_commands.py')
-rw-r--r--lib/python/qmk/tests/test_cli_commands.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/python/qmk/tests/test_cli_commands.py b/lib/python/qmk/tests/test_cli_commands.py
index a93587150c..768929de1d 100644
--- a/lib/python/qmk/tests/test_cli_commands.py
+++ b/lib/python/qmk/tests/test_cli_commands.py
@@ -84,3 +84,9 @@ def test_list_keymaps_no_keyboard_found():
result = check_subcommand('list-keymaps', '-kb', 'asdfghjkl')
assert result.returncode == 0
assert 'does not exist' in result.stdout
+
+
+def test_json2c():
+ result = check_subcommand('json2c', 'keyboards/handwired/onekey/keymaps/default_json/keymap.json')
+ assert result.returncode == 0
+ assert result.stdout == '#include QMK_KEYBOARD_H\nconst uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {\t[0] = LAYOUT(KC_A)};\n\n'