CLI: fix json2c
subcommand and add/fix tests (#9206)
Co-authored-by: Zach White <skullydazed@users.noreply.github.com>
This commit is contained in:
parent
af2ca13604
commit
6501377070
5 changed files with 25 additions and 9 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue