Commit 7f1b7a1c360929a1351ed254055f702bac5ee61b

Ran Benita 2013-07-25T13:21:33

test/keyseq: add de(neo) Level{6,7,8} tests Signed-off-by: Ran Benita <ran234@gmail.com>

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", "",