Skip to content

Instantly share code, notes, and snippets.

@zmike
Created January 20, 2016 19:17
Show Gist options
  • Select an option

  • Save zmike/88daf2a29a7b6d5d4987 to your computer and use it in GitHub Desktop.

Select an option

Save zmike/88daf2a29a7b6d5d4987 to your computer and use it in GitHub Desktop.
xkbcommon test
diff --git a/test/state.c b/test/state.c
index 8ae718c..81bf473 100644
--- a/test/state.c
+++ b/test/state.c
@@ -678,6 +678,8 @@ main(void)
{
struct xkb_context *context = test_get_context(0);
struct xkb_keymap *keymap;
+ xkb_keycode_t kc;
+ const char *keyname;
assert(context);
@@ -689,6 +691,11 @@ main(void)
keymap = test_compile_rules(context, "evdev", "pc104", "us,ru", NULL, "grp:menu_toggle");
assert(keymap);
+ kc = xkb_keymap_key_by_name(keymap, "9");
+ assert(kc != XKB_KEYCODE_INVALID);
+ keyname = xkb_keymap_key_get_name(keymap, kc);
+ assert(!strcmp(keyname, "9"));
+
test_update_key(keymap);
test_serialisation(keymap);
test_update_mask_mods(keymap);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment