aboutsummaryrefslogtreecommitdiff
path: root/t/12strpkey.c
diff options
context:
space:
mode:
authorPaul LeoNerd Evans <leonerd@leonerd.org.uk>2011-04-01 10:41:44 +0100
committerPaul LeoNerd Evans <leonerd@leonerd.org.uk>2011-04-01 10:41:44 +0100
commit59800c356b7737213d80bec5d0b3f0df4b69284c (patch)
tree5b9278e11676d0bc52accc5c01c25cc828a94748 /t/12strpkey.c
parent6424282c4ddb129d6987a0f8c03f3d23132b842c (diff)
downloadtermo-59800c356b7737213d80bec5d0b3f0df4b69284c.tar.gz
termo-59800c356b7737213d80bec5d0b3f0df4b69284c.tar.xz
termo-59800c356b7737213d80bec5d0b3f0df4b69284c.zip
Unicode codepoint is stored in key->code.codepoint, not code.number
Diffstat (limited to 't/12strpkey.c')
-rw-r--r--t/12strpkey.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/t/12strpkey.c b/t/12strpkey.c
index 648e1c1..71c3f5d 100644
--- a/t/12strpkey.c
+++ b/t/12strpkey.c
@@ -7,7 +7,7 @@ int main(int argc, char *argv[])
TermKeyKey key;
TermKeyResult res;
-#define CLEAR_KEY do { key.type = -1; key.code.number = -1; key.modifiers = -1; key.utf8[0] = 0; } while(0)
+#define CLEAR_KEY do { key.type = -1; key.code.codepoint = -1; key.modifiers = -1; key.utf8[0] = 0; } while(0)
plan_tests(44);
@@ -17,7 +17,7 @@ int main(int argc, char *argv[])
res = termkey_strpkey(tk, "A", &key, 0);
is_int(res, TERMKEY_RES_KEY, "result for unicode/A/0");
is_int(key.type, TERMKEY_TYPE_UNICODE, "key.type for unicode/A/0");
- is_int(key.code.number, 'A', "key.code.number for unicode/A/0");
+ is_int(key.code.codepoint, 'A', "key.code.codepoint for unicode/A/0");
is_int(key.modifiers, 0, "key.modifiers for unicode/A/0");
is_str(key.utf8, "A", "key.utf8 for unicode/A/0");
@@ -25,7 +25,7 @@ int main(int argc, char *argv[])
res = termkey_strpkey(tk, "C-b", &key, 0);
is_int(res, TERMKEY_RES_KEY, "result for unicode/b/CTRL");
is_int(key.type, TERMKEY_TYPE_UNICODE, "key.type for unicode/b/CTRL");
- is_int(key.code.number, 'b', "key.code.number for unicode/b/CTRL");
+ is_int(key.code.codepoint, 'b', "key.code.codepoint for unicode/b/CTRL");
is_int(key.modifiers, TERMKEY_KEYMOD_CTRL, "key.modifiers for unicode/b/CTRL");
is_str(key.utf8, "b", "key.utf8 for unicode/b/CTRL");
@@ -33,7 +33,7 @@ int main(int argc, char *argv[])
res = termkey_strpkey(tk, "Ctrl-b", &key, TERMKEY_FORMAT_LONGMOD);
is_int(res, TERMKEY_RES_KEY, "result for unicode/b/CTRL longmod");
is_int(key.type, TERMKEY_TYPE_UNICODE, "key.type for unicode/b/CTRL longmod");
- is_int(key.code.number, 'b', "key.code.number for unicode/b/CTRL longmod");
+ is_int(key.code.codepoint, 'b', "key.code.codepoint for unicode/b/CTRL longmod");
is_int(key.modifiers, TERMKEY_KEYMOD_CTRL, "key.modifiers for unicode/b/CTRL longmod");
is_str(key.utf8, "b", "key.utf8 for unicode/b/CTRL longmod");
@@ -41,7 +41,7 @@ int main(int argc, char *argv[])
res = termkey_strpkey(tk, "^B", &key, TERMKEY_FORMAT_CARETCTRL);
is_int(res, TERMKEY_RES_KEY, "result for unicode/b/CTRL caretctrl");
is_int(key.type, TERMKEY_TYPE_UNICODE, "key.type for unicode/b/CTRL caretctrl");
- is_int(key.code.number, 'b', "key.code.number for unicode/b/CTRL caretctrl");
+ is_int(key.code.codepoint, 'b', "key.code.codepoint for unicode/b/CTRL caretctrl");
is_int(key.modifiers, TERMKEY_KEYMOD_CTRL, "key.modifiers for unicode/b/CTRL caretctrl");
is_str(key.utf8, "b", "key.utf8 for unicode/b/CTRL caretctrl");
@@ -49,7 +49,7 @@ int main(int argc, char *argv[])
res = termkey_strpkey(tk, "A-c", &key, 0);
is_int(res, TERMKEY_RES_KEY, "result for unicode/c/ALT");
is_int(key.type, TERMKEY_TYPE_UNICODE, "key.type for unicode/c/ALT");
- is_int(key.code.number, 'c', "key.code.number for unicode/c/ALT");
+ is_int(key.code.codepoint, 'c', "key.code.codepoint for unicode/c/ALT");
is_int(key.modifiers, TERMKEY_KEYMOD_ALT, "key.modifiers for unicode/c/ALT");
is_str(key.utf8, "c", "key.utf8 for unicode/c/ALT");
@@ -57,7 +57,7 @@ int main(int argc, char *argv[])
res = termkey_strpkey(tk, "Alt-c", &key, TERMKEY_FORMAT_LONGMOD);
is_int(res, TERMKEY_RES_KEY, "result for unicode/c/ALT longmod");
is_int(key.type, TERMKEY_TYPE_UNICODE, "key.type for unicode/c/ALT longmod");
- is_int(key.code.number, 'c', "key.code.number for unicode/c/ALT longmod");
+ is_int(key.code.codepoint, 'c', "key.code.codepoint for unicode/c/ALT longmod");
is_int(key.modifiers, TERMKEY_KEYMOD_ALT, "key.modifiers for unicode/c/ALT longmod");
is_str(key.utf8, "c", "key.utf8 for unicode/c/ALT longmod");
@@ -65,7 +65,7 @@ int main(int argc, char *argv[])
res = termkey_strpkey(tk, "M-c", &key, TERMKEY_FORMAT_ALTISMETA);
is_int(res, TERMKEY_RES_KEY, "result for unicode/c/ALT altismeta");
is_int(key.type, TERMKEY_TYPE_UNICODE, "key.type for unicode/c/ALT altismeta");
- is_int(key.code.number, 'c', "key.code.number for unicode/c/ALT altismeta");
+ is_int(key.code.codepoint, 'c', "key.code.codepoint for unicode/c/ALT altismeta");
is_int(key.modifiers, TERMKEY_KEYMOD_ALT, "key.modifiers for unicode/c/ALT altismeta");
is_str(key.utf8, "c", "key.utf8 for unicode/c/ALT altismeta");
@@ -73,7 +73,7 @@ int main(int argc, char *argv[])
res = termkey_strpkey(tk, "Meta-c", &key, TERMKEY_FORMAT_ALTISMETA|TERMKEY_FORMAT_LONGMOD);
is_int(res, TERMKEY_RES_KEY, "result for unicode/c/ALT altismeta+longmod");
is_int(key.type, TERMKEY_TYPE_UNICODE, "key.type for unicode/c/ALT altismeta+longmod");
- is_int(key.code.number, 'c', "key.code.number for unicode/c/ALT altismeta+longmod");
+ is_int(key.code.codepoint, 'c', "key.code.codepoint for unicode/c/ALT altismeta+longmod");
is_int(key.modifiers, TERMKEY_KEYMOD_ALT, "key.modifiers for unicode/c/ALT altismeta+longmod");
is_str(key.utf8, "c", "key.utf8 for unicode/c/ALT altismeta+longmod");
@@ -81,7 +81,7 @@ int main(int argc, char *argv[])
res = termkey_strpkey(tk, "Up", &key, 0);
is_int(res, TERMKEY_RES_KEY, "result for sym/Up/0");
is_int(key.type, TERMKEY_TYPE_KEYSYM, "key.type for sym/Up/0");
- is_int(key.code.sym, TERMKEY_SYM_UP, "key.code.number for sym/Up/0");
+ is_int(key.code.sym, TERMKEY_SYM_UP, "key.code.codepoint for sym/Up/0");
is_int(key.modifiers, 0, "key.modifiers for sym/Up/0");
termkey_destroy(tk);