summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorRan Benita <ran234@gmail.com>2012-07-11 14:12:12 +0300
committerDaniel Stone <daniel@fooishbar.org>2012-07-12 09:42:10 +0100
commit09d1445b4ad0ca5e13d13c2262c5bf1d583b16fe (patch)
tree7d54664fccea7876d33d30dc82771472f6e4b55b /test
parent19f814f95e30675606dc5ac7c72e1f9434b3020c (diff)
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>
Diffstat (limited to 'test')
-rw-r--r--test/keyseq.c18
1 files changed, 13 insertions, 5 deletions
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,