Lines Matching +full:0 +full:xd0
26 /* {"title", "test 1|test 2|...|test N!", (0 or 1)}, */
28 …{"a simple test", "'test' is '\xd0\xbf\xd1\x80\xd0\xbe\xd0\xb2\xd0\xb5\xd1\x80\xd0\xba\xd0\xb0' in…
31 {"u-0 is a control character", "\x00!", 0},
32 {"u-80 is a control character", "\xc2\x80!", 0},
35 {"5 bytes sequences are not allowed", "\xf8\x88\x80\x80\x80!", 0},
36 {"6 bytes sequences are not allowed", "\xfc\x84\x80\x80\x80\x80!", 0},
38 {"u-7f is a control character", "\x7f!", 0},
40 {"u-FFFF is a control character", "\xef\xbf\xbf!", 0},
41 {"u-1FFFFF is too large", "\xf7\xbf\xbf\xbf!", 0},
42 {"u-3FFFFFF is 5 bytes", "\xfb\xbf\xbf\xbf\xbf!", 0},
43 {"u-7FFFFFFF is 6 bytes", "\xfd\xbf\xbf\xbf\xbf\xbf!", 0},
49 {"u-110000", "\xf4\x90\x80\x80!", 0},
51 {"first continuation byte", "\x80!", 0},
52 {"last continuation byte", "\xbf!", 0},
54 {"2 continuation bytes", "\x80\xbf!", 0},
55 {"3 continuation bytes", "\x80\xbf\x80!", 0},
56 {"4 continuation bytes", "\x80\xbf\x80\xbf!", 0},
57 {"5 continuation bytes", "\x80\xbf\x80\xbf\x80!", 0},
58 {"6 continuation bytes", "\x80\xbf\x80\xbf\x80\xbf!", 0},
59 {"7 continuation bytes", "\x80\xbf\x80\xbf\x80\xbf\x80!", 0},
65 "\xb0|\xb1|\xb2|\xb3|\xb4|\xb5|\xb6|\xb7|\xb8|\xb9|\xba|\xbb|\xbc|\xbd|\xbe|\xbf!", 0},
66 {"32 first bytes of 2-byte sequences {0xc0-0xdf}",
68 …"\xd0 |\xd1 |\xd2 |\xd3 |\xd4 |\xd5 |\xd6 |\xd7 |\xd8 |\xd9 |\xda |\xdb |\xdc |\xdd |\xde |\xdf !"…
69 {"16 first bytes of 3-byte sequences {0xe0-0xef}",
70 …0 |\xe1 |\xe2 |\xe3 |\xe4 |\xe5 |\xe6 |\xe7 |\xe8 |\xe9 |\xea |\xeb |\xec |\xed |\xee |\xef !", 0},
71 …{"8 first bytes of 4-byte sequences {0xf0-0xf7}", "\xf0 |\xf1 |\xf2 |\xf3 |\xf4 |\xf5 |\xf6 |\xf7 …
72 {"4 first bytes of 5-byte sequences {0xf8-0xfb}", "\xf8 |\xf9 |\xfa |\xfb !", 0},
73 {"2 first bytes of 6-byte sequences {0xfc-0xfd}", "\xfc |\xfd !", 0},
75 {"sequences with last byte missing {u-0}",
76 "\xc0|\xe0\x80|\xf0\x80\x80|\xf8\x80\x80\x80|\xfc\x80\x80\x80\x80!", 0},
78 "\xdf|\xef\xbf|\xf7\xbf\xbf|\xfb\xbf\xbf\xbf|\xfd\xbf\xbf\xbf\xbf!", 0},
80 {"impossible bytes", "\xfe|\xff|\xfe\xfe\xff\xff!", 0},
83 "\xc0\xaf|\xe0\x80\xaf|\xf0\x80\x80\xaf|\xf8\x80\x80\x80\xaf|\xfc\x80\x80\x80\x80\xaf!", 0},
86 "\xc1\xbf|\xe0\x9f\xbf|\xf0\x8f\xbf\xbf|\xf8\x87\xbf\xbf\xbf|\xfc\x83\xbf\xbf\xbf\xbf!", 0},
89 "\xc0\x80|\xe0\x80\x80|\xf0\x80\x80\x80|\xf8\x80\x80\x80\x80|\xfc\x80\x80\x80\x80\x80!", 0},
92 … "\xed\xa0\x80|\xed\xad\xbf|\xed\xae\x80|\xed\xaf\xbf|\xed\xb0\x80|\xed\xbe\x80|\xed\xbf\xbf!", 0},
97 "\xed\xaf\xbf\xed\xb0\x80|\xed\xaf\xbf\xed\xbf\xbf!", 0},
99 {"other illegal code positions", "\xef\xbf\xbe|\xef\xbf\xbf!", 0},
101 {NULL, NULL, 0}
108 {"no bom (utf-8)", "Hi is \xd0\x9f\xd1\x80\xd0\xb8\xd0\xb2\xd0\xb5\xd1\x82!", 13},
109 {"bom (utf-8)", "\xef\xbb\xbfHi is \xd0\x9f\xd1\x80\xd0\xb8\xd0\xb2\xd0\xb5\xd1\x82!", 13},
112 {NULL, NULL, 0}
115 char *bom_original = "Hi is \xd0\x9f\xd1\x80\xd0\xb8\xd0\xb2\xd0\xb5\xd1\x82";
120 int failed = 0; in check_utf8_sequences()
123 for (k = 0; utf8_sequences[k].test; k++) { in check_utf8_sequences()
168 int failed = 0; in check_boms()
171 for (k = 0; boms[k].test; k++) { in check_boms()
191 else if (memcmp(parser.buffer.start, bom_original, check) != 0) { in check_boms()
210 int k = 0; in check_long_utf8()
212 int failed = 0; in check_long_utf8()
220 for (j = 0; j < LONG; j ++) { in check_long_utf8()
222 buffer[k++] = '\xd0'; in check_long_utf8()
226 buffer[k++] = '\xd0'; in check_long_utf8()
232 for (k = 0; k < LONG; k++) { in check_long_utf8()
246 ch0 = '\xd0'; in check_long_utf8()
250 ch0 = '\xd0'; in check_long_utf8()
253 if (parser.buffer.pointer[0] != ch0 || parser.buffer.pointer[1] != ch1) { in check_long_utf8()
255 (int)parser.buffer.pointer[0], (int)parser.buffer.pointer[1], in check_long_utf8()
268 else if (parser.buffer.pointer[0] != '\0') { in check_long_utf8()
269 …printf("\texpected NUL, found %X (eof=%d, unread=%ld)\n", (int)parser.buffer.pointer[0], parser.eo… in check_long_utf8()
282 int k = 0; in check_long_utf16()
284 int failed = 0; in check_long_utf16()
291 for (j = 0; j < LONG; j ++) { in check_long_utf16()
303 for (k = 0; k < LONG; k++) { in check_long_utf16()
317 ch0 = '\xd0'; in check_long_utf16()
321 ch0 = '\xd0'; in check_long_utf16()
324 if (parser.buffer.pointer[0] != ch0 || parser.buffer.pointer[1] != ch1) { in check_long_utf16()
326 (int)parser.buffer.pointer[0], (int)parser.buffer.pointer[1], in check_long_utf16()
339 else if (parser.buffer.pointer[0] != '\0') { in check_long_utf16()
340 …printf("\texpected NUL, found %X (eof=%d, unread=%ld)\n", (int)parser.buffer.pointer[0], parser.eo… in check_long_utf16()