test/keyseq: add de(neo) Level{6,7,8} tests Signed-off-by: Ran Benita <ran234@gmail.com>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
diff --git a/test/common.c b/test/common.c
index 796904e..a213588 100644
--- a/test/common.c
+++ b/test/common.c
@@ -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");
keysym = va_arg(ap, int);
diff --git a/test/keyseq.c b/test/keyseq.c
index fb6aa41..f1f46ed 100644
--- a/test/keyseq.c
+++ b/test/keyseq.c
@@ -319,7 +319,43 @@ main(void)
KEY_SPACE, BOTH, XKB_KEY_KP_0, NEXT,
KEY_KP8, BOTH, XKB_KEY_KP_Up, 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);
keymap = test_compile_rules(ctx, "evdev", "", "us,il,ru", "",