diff options
Diffstat (limited to 'lib/python/qmk/tests/test_cli_commands.py')
| -rw-r--r-- | lib/python/qmk/tests/test_cli_commands.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/python/qmk/tests/test_cli_commands.py b/lib/python/qmk/tests/test_cli_commands.py index c379c92229..d5cf1841c9 100644 --- a/lib/python/qmk/tests/test_cli_commands.py +++ b/lib/python/qmk/tests/test_cli_commands.py | |||
| @@ -156,6 +156,18 @@ def test_json2c_stdin(): | |||
| 156 | assert result.stdout == '#include QMK_KEYBOARD_H\nconst uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {\t[0] = LAYOUT_ortho_1x1(KC_A)};\n\n' | 156 | assert result.stdout == '#include QMK_KEYBOARD_H\nconst uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {\t[0] = LAYOUT_ortho_1x1(KC_A)};\n\n' |
| 157 | 157 | ||
| 158 | 158 | ||
| 159 | def test_json2c_wrong_json(): | ||
| 160 | result = check_subcommand('json2c', 'keyboards/handwired/pytest/info.json') | ||
| 161 | check_returncode(result, [1]) | ||
| 162 | assert 'Invalid JSON keymap' in result.stdout | ||
| 163 | |||
| 164 | |||
| 165 | def test_json2c_no_json(): | ||
| 166 | result = check_subcommand('json2c', 'keyboards/handwired/pytest/pytest.h') | ||
| 167 | check_returncode(result, [1]) | ||
| 168 | assert 'Invalid JSON encountered' in result.stdout | ||
| 169 | |||
| 170 | |||
| 159 | def test_info(): | 171 | def test_info(): |
| 160 | result = check_subcommand('info', '-kb', 'handwired/pytest/basic') | 172 | result = check_subcommand('info', '-kb', 'handwired/pytest/basic') |
| 161 | check_returncode(result) | 173 | check_returncode(result) |
