diff options
Diffstat (limited to 'lib/python/qmk/tests/test_cli_commands.py')
-rw-r--r-- | lib/python/qmk/tests/test_cli_commands.py | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/lib/python/qmk/tests/test_cli_commands.py b/lib/python/qmk/tests/test_cli_commands.py index b10fd8d19d..dd659fe0f2 100644 --- a/lib/python/qmk/tests/test_cli_commands.py +++ b/lib/python/qmk/tests/test_cli_commands.py @@ -152,17 +152,16 @@ def test_json2c(): * This file was generated by qmk json2c. You may or may not want to * edit it directly. */ + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT_ortho_1x1(KC_A) }; -#if defined(ENCODER_ENABLE) && defined(ENCODER_MAP_ENABLE) -const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { - -}; -#endif // defined(ENCODER_ENABLE) && defined(ENCODER_MAP_ENABLE) +#ifdef OTHER_KEYMAP_C +# include OTHER_KEYMAP_C +#endif // OTHER_KEYMAP_C """ @@ -190,28 +189,21 @@ def test_json2c_stdin(): * This file was generated by qmk json2c. You may or may not want to * edit it directly. */ + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT_ortho_1x1(KC_A) }; -#if defined(ENCODER_ENABLE) && defined(ENCODER_MAP_ENABLE) -const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { - -}; -#endif // defined(ENCODER_ENABLE) && defined(ENCODER_MAP_ENABLE) +#ifdef OTHER_KEYMAP_C +# include OTHER_KEYMAP_C +#endif // OTHER_KEYMAP_C """ -def test_json2c_wrong_json(): - result = check_subcommand('json2c', 'keyboards/handwired/pytest/info.json') - check_returncode(result, [1]) - assert 'Invalid JSON keymap' in result.stdout - - def test_json2c_no_json(): result = check_subcommand('json2c', 'keyboards/handwired/pytest/basic/keymaps/default/keymap.c') check_returncode(result, [1]) |