diff options
Diffstat (limited to 'test/state.c')
-rw-r--r-- | test/state.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/state.c b/test/state.c index 3da4c99..8cd11e0 100644 --- a/test/state.c +++ b/test/state.c @@ -149,6 +149,11 @@ test_update_key(struct xkb_keymap *keymap) XKB_MOD_NAME_CTRL, XKB_MOD_NAME_ALT, NULL) > 0); + assert(xkb_state_mod_names_are_active(state, XKB_STATE_LATCHED, + XKB_STATE_MATCH_ANY, + XKB_MOD_NAME_CTRL, + XKB_MOD_NAME_ALT, + NULL) == 0); /* none down */ xkb_state_update_key(state, KEY_RIGHTALT + EVDEV_OFFSET, XKB_KEY_UP); @@ -157,10 +162,14 @@ test_update_key(struct xkb_keymap *keymap) /* Caps locked */ xkb_state_update_key(state, KEY_CAPSLOCK + EVDEV_OFFSET, XKB_KEY_DOWN); + assert(xkb_state_mod_name_is_active(state, XKB_MOD_NAME_CAPS, + XKB_STATE_DEPRESSED) > 0); xkb_state_update_key(state, KEY_CAPSLOCK + EVDEV_OFFSET, XKB_KEY_UP); fprintf(stderr, "dumping state for Caps Lock:\n"); print_state(state); assert(xkb_state_mod_name_is_active(state, XKB_MOD_NAME_CAPS, + XKB_STATE_DEPRESSED) == 0); + assert(xkb_state_mod_name_is_active(state, XKB_MOD_NAME_CAPS, XKB_STATE_LOCKED) > 0); assert(xkb_state_led_name_is_active(state, XKB_LED_NAME_CAPS) > 0); num_syms = xkb_state_key_get_syms(state, KEY_Q + EVDEV_OFFSET, &syms); |