def test_0025_extract_layouts_cluecard(): """Test our layout extraction code. """ keymap_file = 'qmk_firmware/keyboards/clueboard/card/keymaps/default/keymap.c' keymap_text = update_kb_redis.preprocess_source(keymap_file) layouts = update_kb_redis.extract_layouts(keymap_text, keymap_file) assert layouts == 'constuint16_tPROGMEMkeymaps[][MATRIX_ROWS][MATRIX_COLS]={[0]=LAYOUT(RGB_TOG,RGB_SAI,RGB_VAI,RGB_HUD,RGB_HUI,RGB_MOD,RGB_SAD,RGB_VAD,BL_STEP,SONG_SU,SONG_SC,SONG_GB)}'
def test_0024_populate_enums_planck(): """Test the enum extraction code. """ keymap_file = 'qmk_firmware/keyboards/planck/keymaps/default/keymap.c' keymap_text = update_kb_redis.preprocess_source(keymap_file) keymap = update_kb_redis.extract_layouts(keymap_text, keymap_file) keymap_enums = update_kb_redis.populate_enums(keymap_text, keymap) assert keymap_enums ## FIXME I'm honestly not sure what update_kb_redis.populate_enums is for. Need to figure that out before I can test it.
def test_0024_populate_enums_planck(): """Test the enum extraction code. """ keymap_file = 'qmk_firmware/keyboards/planck/keymaps/default/keymap.c' keymap_text = update_kb_redis.preprocess_source(keymap_file) keymap = update_kb_redis.extract_layouts(keymap_text, keymap_file) keymap_enums = update_kb_redis.populate_enums(keymap_text, keymap) assert '[0]=LAYOUT_planck_grid' in keymap_enums assert '[1]=LAYOUT_planck_grid' in keymap_enums assert '[2]=LAYOUT_planck_grid' in keymap_enums assert '[3]=LAYOUT_planck_grid' in keymap_enums assert '[4]=LAYOUT_planck_grid' in keymap_enums assert '[5]=LAYOUT_planck_grid' in keymap_enums assert '[6]=LAYOUT_planck_grid' in keymap_enums