[PATCH libxkbcommon 2/2] test/keysym: add tests for case-insensitive/lower-case matches

David Herrmann dh.herrmann at googlemail.com
Mon Oct 1 10:29:59 PDT 2012


This tests whether the exact case-match is always prefered to
case-insensitive matches.

Signed-off-by: David Herrmann <dh.herrmann at googlemail.com>
---
 test/keysym.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/test/keysym.c b/test/keysym.c
index 1bf704b..2c4e1f1 100644
--- a/test/keysym.c
+++ b/test/keysym.c
@@ -69,6 +69,11 @@ int
 main(void)
 {
     assert(test_string("Undo", 0xFF65));
+    assert(test_string("undo", 0xFF65));
+    assert(test_string("A", 0x0041));
+    assert(test_string("a", 0x0061));
+    assert(test_string("Ohook", 0x1001ece));
+    assert(test_string("ohook", 0x1001ecf));
     assert(test_string("ThisKeyShouldNotExist", XKB_KEY_NoSymbol));
     assert(test_string("XF86_Switch_VT_5", 0x1008FE05));
     assert(test_string("VoidSymbol", 0xFFFFFF));
@@ -79,6 +84,9 @@ main(void)
     assert(test_keysym(0x0, "NoSymbol"));
     assert(test_keysym(0x1008FE20, "XF86Ungrab"));
     assert(test_keysym(0x01001234, "U1234"));
+    assert(test_keysym(0xFF65, "Undo"));
+    assert(test_keysym(0x0041, "A"));
+    assert(test_keysym(0x0061, "a"));
 
     assert(test_utf8(XKB_KEY_y, "y"));
     assert(test_utf8(XKB_KEY_u, "u"));
-- 
1.7.12.2



More information about the wayland-devel mailing list