From 258691135f3df9604e00cf35c3add81412b83241 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=99emysl=20Janouch?= Date: Tue, 4 Oct 2016 13:22:52 +0200 Subject: Use termo_str{f,p}key_utf8 in tests No need to be locale dependent here. --- tests/12strpkey.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'tests/12strpkey.c') diff --git a/tests/12strpkey.c b/tests/12strpkey.c index d21a547..96f1d31 100644 --- a/tests/12strpkey.c +++ b/tests/12strpkey.c @@ -16,7 +16,7 @@ main (int argc, char *argv[]) tk = termo_new_abstract ("vt100", NULL, 0); CLEAR_KEY; - endp = termo_strpkey (tk, "A", &key, 0); + endp = termo_strpkey_utf8 (tk, "A", &key, 0); is_int (key.type, TERMO_TYPE_KEY, "key.type 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"); @@ -24,7 +24,7 @@ main (int argc, char *argv[]) is_str (endp, "", "consumed entire input for unicode/A/0"); CLEAR_KEY; - endp = termo_strpkey (tk, "A and more", &key, 0); + endp = termo_strpkey_utf8 (tk, "A and more", &key, 0); is_int (key.type, TERMO_TYPE_KEY, "key.type for unicode/A/0 trailing"); is_int (key.code.codepoint, 'A', @@ -35,7 +35,7 @@ main (int argc, char *argv[]) "points at string tail for unicode/A/0 trailing"); CLEAR_KEY; - endp = termo_strpkey (tk, "C-b", &key, 0); + endp = termo_strpkey_utf8 (tk, "C-b", &key, 0); is_int (key.type, TERMO_TYPE_KEY, "key.type for unicode/b/CTRL"); is_int (key.code.codepoint, 'b', "key.code.codepoint for unicode/b/CTRL"); is_int (key.modifiers, TERMO_KEYMOD_CTRL, @@ -44,7 +44,7 @@ main (int argc, char *argv[]) is_str (endp, "", "consumed entire input for unicode/b/CTRL"); CLEAR_KEY; - endp = termo_strpkey (tk, "Ctrl-b", &key, TERMO_FORMAT_LONGMOD); + endp = termo_strpkey_utf8 (tk, "Ctrl-b", &key, TERMO_FORMAT_LONGMOD); is_int (key.type, TERMO_TYPE_KEY, "key.type for unicode/b/CTRL longmod"); is_int (key.code.codepoint, 'b', @@ -55,7 +55,7 @@ main (int argc, char *argv[]) is_str (endp, "", "consumed entire input for unicode/b/CTRL longmod"); CLEAR_KEY; - endp = termo_strpkey (tk, "^B", &key, TERMO_FORMAT_CARETCTRL); + endp = termo_strpkey_utf8 (tk, "^B", &key, TERMO_FORMAT_CARETCTRL); is_int (key.type, TERMO_TYPE_KEY, "key.type for unicode/b/CTRL caretctrl"); is_int (key.code.codepoint, 'b', @@ -66,7 +66,7 @@ main (int argc, char *argv[]) is_str (endp, "", "consumed entire input for unicode/b/CTRL caretctrl"); CLEAR_KEY; - endp = termo_strpkey (tk, "A-c", &key, 0); + endp = termo_strpkey_utf8 (tk, "A-c", &key, 0); is_int (key.type, TERMO_TYPE_KEY, "key.type for unicode/c/ALT"); is_int (key.code.codepoint, 'c', "key.code.codepoint for unicode/c/ALT"); is_int (key.modifiers, TERMO_KEYMOD_ALT, @@ -75,7 +75,7 @@ main (int argc, char *argv[]) is_str (endp, "", "consumed entire input for unicode/c/ALT"); CLEAR_KEY; - endp = termo_strpkey (tk, "Alt-c", &key, TERMO_FORMAT_LONGMOD); + endp = termo_strpkey_utf8 (tk, "Alt-c", &key, TERMO_FORMAT_LONGMOD); is_int (key.type, TERMO_TYPE_KEY, "key.type for unicode/c/ALT longmod"); is_int (key.code.codepoint, 'c', @@ -86,7 +86,7 @@ main (int argc, char *argv[]) is_str (endp, "", "consumed entire input for unicode/c/ALT longmod"); CLEAR_KEY; - endp = termo_strpkey (tk, "M-c", &key, TERMO_FORMAT_ALTISMETA); + endp = termo_strpkey_utf8 (tk, "M-c", &key, TERMO_FORMAT_ALTISMETA); is_int (key.type, TERMO_TYPE_KEY, "key.type for unicode/c/ALT altismeta"); is_int (key.code.codepoint, 'c', @@ -97,7 +97,7 @@ main (int argc, char *argv[]) is_str (endp, "", "consumed entire input for unicode/c/ALT altismeta"); CLEAR_KEY; - endp = termo_strpkey (tk, "Meta-c", &key, + endp = termo_strpkey_utf8 (tk, "Meta-c", &key, TERMO_FORMAT_ALTISMETA | TERMO_FORMAT_LONGMOD); is_int (key.type, TERMO_TYPE_KEY, "key.type for unicode/c/ALT altismeta+longmod"); @@ -110,7 +110,7 @@ main (int argc, char *argv[]) "consumed entire input for unicode/c/ALT altismeta+longmod"); CLEAR_KEY; - endp = termo_strpkey (tk, "meta c", &key, + endp = termo_strpkey_utf8 (tk, "meta c", &key, TERMO_FORMAT_ALTISMETA | TERMO_FORMAT_LONGMOD | TERMO_FORMAT_SPACEMOD | TERMO_FORMAT_LOWERMOD); is_int (key.type, TERMO_TYPE_KEY, @@ -125,7 +125,7 @@ main (int argc, char *argv[]) "consumed entire input for unicode/c/ALT altismeta+long/space+lowermod"); CLEAR_KEY; - endp = termo_strpkey (tk, "ctrl alt page up", &key, + endp = termo_strpkey_utf8 (tk, "ctrl alt page up", &key, TERMO_FORMAT_LONGMOD | TERMO_FORMAT_SPACEMOD | TERMO_FORMAT_LOWERMOD | TERMO_FORMAT_LOWERSPACE); is_int (key.type, TERMO_TYPE_KEYSYM, @@ -139,14 +139,14 @@ main (int argc, char *argv[]) " long/space/lowermod+lowerspace"); CLEAR_KEY; - endp = termo_strpkey (tk, "Up", &key, 0); + endp = termo_strpkey_utf8 (tk, "Up", &key, 0); is_int (key.type, TERMO_TYPE_KEYSYM, "key.type for sym/Up/0"); is_int (key.code.sym, TERMO_SYM_UP, "key.code.codepoint for sym/Up/0"); is_int (key.modifiers, 0, "key.modifiers for sym/Up/0"); is_str (endp, "", "consumed entire input for sym/Up/0"); CLEAR_KEY; - endp = termo_strpkey (tk, "F5", &key, 0); + endp = termo_strpkey_utf8 (tk, "F5", &key, 0); is_int (key.type, TERMO_TYPE_FUNCTION, "key.type for func/5/0"); is_int (key.code.number, 5, "key.code.number for func/5/0"); is_int (key.modifiers, 0, "key.modifiers for func/5/0"); -- cgit v1.2.3