Get rid of most block comments
They're rather difficult to maintain.
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user