diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/03utf8.c | 14 | ||||
-rw-r--r-- | tests/05read.c | 5 | ||||
-rw-r--r-- | tests/11strfkey.c | 4 | ||||
-rw-r--r-- | tests/31position.c | 2 |
4 files changed, 12 insertions, 13 deletions
diff --git a/tests/03utf8.c b/tests/03utf8.c index bd0af00..ed82352 100644 --- a/tests/03utf8.c +++ b/tests/03utf8.c @@ -18,8 +18,8 @@ main (int argc, char *argv[]) is_int (key.type, TERMO_TYPE_KEY, "key.type low ASCII"); is_int (key.code.codepoint, 'a', "key.code.codepoint low ASCII"); - /* 2-byte UTF-8 range is U+0080 to U+07FF (0xDF 0xBF) */ - /* However, we'd best avoid the C1 range, so we'll start at U+00A0 (0xC2 0xA0) */ + // 2-byte UTF-8 range is U+0080 to U+07FF (0xDF 0xBF) + // However, we'd best avoid the C1 range, so we'll start at U+00A0 (0xC2 0xA0) termo_push_bytes (tk, "\xC2\xA0", 2); @@ -35,7 +35,7 @@ main (int argc, char *argv[]) is_int (key.type, TERMO_TYPE_KEY, "key.type UTF-8 2 high"); is_int (key.code.codepoint, 0x07FF, "key.code.codepoint UTF-8 2 high"); - /* 3-byte UTF-8 range is U+0800 (0xE0 0xA0 0x80) to U+FFFD (0xEF 0xBF 0xBD) */ + // 3-byte UTF-8 range is U+0800 (0xE0 0xA0 0x80) to U+FFFD (0xEF 0xBF 0xBD) termo_push_bytes (tk, "\xE0\xA0\x80", 3); @@ -51,7 +51,7 @@ main (int argc, char *argv[]) is_int (key.type, TERMO_TYPE_KEY, "key.type UTF-8 3 high"); is_int (key.code.codepoint, 0xFFFD, "key.code.codepoint UTF-8 3 high"); - /* 4-byte UTF-8 range is U+10000 (0xF0 0x90 0x80 0x80) to U+10FFFF (0xF4 0x8F 0xBF 0xBF) */ + // 4-byte UTF-8 range is U+10000 (0xF0 0x90 0x80 0x80) to U+10FFFF (0xF4 0x8F 0xBF 0xBF) termo_push_bytes (tk, "\xF0\x90\x80\x80", 4); @@ -68,9 +68,9 @@ main (int argc, char *argv[]) is_int (key.code.codepoint, 0x10FFFF, "key.code.codepoint UTF-8 4 high"); #if 0 - /* XXX: With the move to iconv, this has changed significantly. */ + // XXX: With the move to iconv, this has changed significantly. - /* Invalid continuations */ + // Invalid continuations termo_push_bytes (tk, "\xC2!", 2); @@ -139,7 +139,7 @@ main (int argc, char *argv[]) "key.code.codepoint UTF-8 4 invalid after"); #endif - /* Partials */ + // Partials termo_push_bytes (tk, "\xC2", 1); is_int (termo_getkey (tk, &key), TERMO_RES_AGAIN, diff --git a/tests/05read.c b/tests/05read.c index 3fb9674..bd7d07c 100644 --- a/tests/05read.c +++ b/tests/05read.c @@ -12,11 +12,10 @@ main (int argc, char *argv[]) plan_tests (21); - /* We'll need a real filehandle we can write/read. - * pipe () can make us one */ + // We'll need a real filehandle we can write/read. pipe() can make us one pipe (fd); - /* Sanitise this just in case */ + // Sanitise this just in case putenv ("TERM=vt100"); tk = termo_new (fd[0], NULL, TERMO_FLAG_NOTERMIOS); diff --git a/tests/11strfkey.c b/tests/11strfkey.c index 8f480e5..41f0273 100644 --- a/tests/11strfkey.c +++ b/tests/11strfkey.c @@ -118,8 +118,8 @@ main (int argc, char *argv[]) is_int (len, 7, "length for sym/PageUp/0 lowerspace"); is_str (buffer, "page up", "buffer for sym/PageUp/0 lowerspace"); - /* If size of buffer is too small, - * strfkey should return something consistent */ + // If size of buffer is too small, + // strfkey should return something consistent len = termo_strfkey (tk, buffer, 4, &key, 0); is_int (len, 6, "length for sym/PageUp/0"); is_str (buffer, "Pag", "buffer of len 4 for sym/PageUp/0"); diff --git a/tests/31position.c b/tests/31position.c index 2179b95..7eb0eca 100644 --- a/tests/31position.c +++ b/tests/31position.c @@ -24,7 +24,7 @@ int main (int argc, char *argv[]) is_int (line, 15, "line for position report"); is_int (col, 7, "column for position report"); - /* A plain CSI R is likely to be <F3> though. This is tricky :/ */ + // A plain CSI R is likely to be <F3> though. This is tricky :/ termo_push_bytes (tk, "\e[R", 3); is_int (termo_getkey (tk, &key), TERMO_RES_KEY, |