Commit 09d1445b4ad0ca5e13d13c2262c5bf1d583b16fe

Ran Benita 2012-07-11T14:12:12

keyseq: add a failing group-switching test For some reason, with the grp:alt_shift_toggle option, the following sequence switches a group: < Left Shift down, Left Alt down > While the reverse doesn't: < Left Alt down, Left Shift down > And it should. Signed-off-by: Ran Benita <ran234@gmail.com>

diff --git a/test/keyseq.c b/test/keyseq.c
index 253735c..2177fcc 100644
--- a/test/keyseq.c
+++ b/test/keyseq.c
@@ -140,18 +140,14 @@ main(void)
         .model = "evdev",
         .layout = "us,il",
         .variant = "",
-        .options = "grp:menu_toggle",
+        .options = "grp:alt_shift_toggle,grp:menu_toggle",
     };
-    char *XXX_remove_me_str;
 
     ctx = xkb_context_new(0);
     assert(ctx);
     keymap = xkb_map_new_from_names(ctx, &names, 0);
     assert(keymap);
 
-    XXX_remove_me_str = xkb_map_get_as_string(keymap);
-    fprintf(stderr, "keymap is:\n%s\n\n", XXX_remove_me_str);
-
     assert(test_key_seq(keymap,
                         KEY_H,  BOTH,  XK_h,  NEXT,
                         KEY_E,  BOTH,  XK_e,  NEXT,
@@ -213,6 +209,18 @@ main(void)
                         KEY_COMPOSE,  BOTH,  XK_ISO_Next_Group,  NEXT,
                         KEY_O,        BOTH,  XK_o,               FINISH));
 
+    assert(test_key_seq(keymap,
+                        KEY_LEFTSHIFT, DOWN, XK_Shift_L,        NEXT,
+                        KEY_LEFTALT,   DOWN, XK_ISO_Next_Group, NEXT,
+                        KEY_LEFTALT,   UP,   XK_ISO_Next_Group, NEXT,
+                        KEY_LEFTSHIFT, UP,   XK_Shift_L,        FINISH));
+
+    assert(test_key_seq(keymap,
+                        KEY_LEFTALT,   DOWN, XK_Alt_L,          NEXT,
+                        KEY_LEFTSHIFT, DOWN, XK_ISO_Next_Group, NEXT,
+                        KEY_LEFTSHIFT, UP,   XK_ISO_Next_Group, NEXT,
+                        KEY_LEFTALT,   UP,   XK_Alt_L,          FINISH));
+
     /* Locked modifiers. */
     assert(test_key_seq(keymap,
                         KEY_CAPSLOCK,  BOTH,  XK_Caps_Lock,  NEXT,