test/keyseq: add de(neo) Level{6,7,8} tests

Signed-off-by: Ran Benita <ran234@gmail.com>
master
Ran Benita 2013-07-25 13:21:33 +03:00
parent ec9a02a239
commit 7f1b7a1c36
2 changed files with 46 additions and 1 deletions

View File

@ -104,6 +104,15 @@ test_key_seq_va(struct xkb_keymap *keymap, va_list ap)
} }
} }
if (nsyms == 0) {
keysym = va_arg(ap, int);
if (keysym != XKB_KEY_NoSymbol) {
xkb_keysym_get_name(keysym, ksbuf, sizeof(ksbuf));
fprintf(stderr, "Expected %s, but got no keysyms.\n", ksbuf);
goto fail;
}
}
fprintf(stderr, "]\n"); fprintf(stderr, "]\n");
keysym = va_arg(ap, int); keysym = va_arg(ap, int);

View File

@ -319,7 +319,43 @@ main(void)
KEY_SPACE, BOTH, XKB_KEY_KP_0, NEXT, KEY_SPACE, BOTH, XKB_KEY_KP_0, NEXT,
KEY_KP8, BOTH, XKB_KEY_KP_Up, NEXT, KEY_KP8, BOTH, XKB_KEY_KP_Up, NEXT,
KEY_ESC, BOTH, XKB_KEY_Escape, NEXT, KEY_ESC, BOTH, XKB_KEY_Escape, NEXT,
KEY_RIGHTALT, UP, XKB_KEY_ISO_Level5_Shift, FINISH)); KEY_RIGHTALT, UP, XKB_KEY_ISO_Level5_Shift, NEXT,
/* Level 6. */
KEY_RIGHTALT, DOWN, XKB_KEY_ISO_Level5_Shift, NEXT,
KEY_RIGHTSHIFT, DOWN, XKB_KEY_Shift_R, NEXT,
KEY_5, BOTH, XKB_KEY_NoSymbol, NEXT,
KEY_8, BOTH, XKB_KEY_ISO_Left_Tab, NEXT,
KEY_E, BOTH, XKB_KEY_Up, NEXT,
KEY_SPACE, BOTH, XKB_KEY_KP_0, NEXT,
KEY_KP8, BOTH, XKB_KEY_KP_Up, NEXT,
KEY_ESC, BOTH, XKB_KEY_Escape, NEXT,
KEY_RIGHTSHIFT, UP, XKB_KEY_Caps_Lock, NEXT,
KEY_RIGHTALT, UP, XKB_KEY_ISO_Level5_Shift, NEXT,
/* Level 7. */
KEY_RIGHTALT, DOWN, XKB_KEY_ISO_Level5_Shift, NEXT,
KEY_CAPSLOCK, DOWN, XKB_KEY_ISO_Level3_Shift, NEXT,
KEY_5, BOTH, KS("U2221"), NEXT,
KEY_E, BOTH, XKB_KEY_Greek_LAMBDA, NEXT,
KEY_SPACE, BOTH, KS("U202F"), NEXT,
KEY_KP8, BOTH, KS("U22C2"), NEXT,
KEY_ESC, BOTH, XKB_KEY_Escape, NEXT,
KEY_CAPSLOCK, UP, XKB_KEY_ISO_Level3_Shift, NEXT,
KEY_RIGHTALT, UP, XKB_KEY_ISO_Level5_Shift, NEXT,
/* Level 8. */
KEY_RIGHTALT, DOWN, XKB_KEY_ISO_Level5_Shift, NEXT,
KEY_CAPSLOCK, DOWN, XKB_KEY_ISO_Level3_Shift, NEXT,
KEY_RIGHTSHIFT, DOWN, XKB_KEY_Shift_R, NEXT,
/* This doesn't actually lock Level5. Not our fault. */
KEY_TAB, BOTH, XKB_KEY_ISO_Level5_Lock, NEXT,
KEY_RIGHTSHIFT, UP, XKB_KEY_Caps_Lock, NEXT,
KEY_CAPSLOCK, UP, XKB_KEY_ISO_Level3_Shift, NEXT,
KEY_RIGHTALT, UP, XKB_KEY_ISO_Level5_Shift, NEXT,
KEY_V, BOTH, XKB_KEY_p, FINISH));
xkb_keymap_unref(keymap); xkb_keymap_unref(keymap);
keymap = test_compile_rules(ctx, "evdev", "", "us,il,ru", "", keymap = test_compile_rules(ctx, "evdev", "", "us,il,ru", "",