Annotate

tests/utf8_sequences.txt @ 8133:102e1ec8bee1

Merge 0.10->trunk
author Kim Alvefur <zash@zash.se>
date Wed, 26 Apr 2017 11:55:27 +0200
parent 6595:89c764cc2424
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
6594
fa6eb6fb4a80 tests: Add UTF-8 validity tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
1 Should pass: 41 42 43 # Simple ASCII - abc
fa6eb6fb4a80 tests: Add UTF-8 validity tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
2 Should pass: 41 42 c3 87 # "ABÇ"
fa6eb6fb4a80 tests: Add UTF-8 validity tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
3 Should pass: 41 42 e1 b8 88 # "ABḈ"
fa6eb6fb4a80 tests: Add UTF-8 validity tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
4 Should pass: 41 42 f0 9d 9c 8d # "AB𝜍"
fa6eb6fb4a80 tests: Add UTF-8 validity tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
5 Should pass: F4 8F BF BF # Last valid sequence (U+10FFFF)
fa6eb6fb4a80 tests: Add UTF-8 validity tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
6 Should fail: F4 90 80 80 # First invalid sequence (U+110000)
fa6eb6fb4a80 tests: Add UTF-8 validity tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
7 Should fail: 80 81 82 83 # Invalid sequence (invalid start byte)
fa6eb6fb4a80 tests: Add UTF-8 validity tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
8 Should fail: C2 C3 # Invalid sequence (invalid continuation byte)
fa6eb6fb4a80 tests: Add UTF-8 validity tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
9 Should fail: C0 43 # Overlong sequence
fa6eb6fb4a80 tests: Add UTF-8 validity tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
10 Should fail: F5 80 80 80 # U+140000 (out of range)
fa6eb6fb4a80 tests: Add UTF-8 validity tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
11 Should fail: ED A0 80 # U+D800 (forbidden by RFC 3629)
fa6eb6fb4a80 tests: Add UTF-8 validity tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
12 Should fail: ED BF BF # U+DFFF (forbidden by RFC 3629)
fa6eb6fb4a80 tests: Add UTF-8 validity tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
13 Should pass: ED 9F BF # U+D7FF (U+D800 minus 1: allowed)
fa6eb6fb4a80 tests: Add UTF-8 validity tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
14 Should pass: EE 80 80 # U+E000 (U+D7FF plus 1: allowed)
fa6eb6fb4a80 tests: Add UTF-8 validity tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
15 Should fail: C0 # Invalid start byte
fa6eb6fb4a80 tests: Add UTF-8 validity tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
16 Should fail: C1 # Invalid start byte
fa6eb6fb4a80 tests: Add UTF-8 validity tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
17 Should fail: C2 # Incomplete sequence
fa6eb6fb4a80 tests: Add UTF-8 validity tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
18 Should fail: F8 88 80 80 80 # 6-byte sequence
fa6eb6fb4a80 tests: Add UTF-8 validity tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
19 Should pass: 7F # Last valid 1-byte sequence (U+00007F)
fa6eb6fb4a80 tests: Add UTF-8 validity tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
20 Should pass: DF BF # Last valid 2-byte sequence (U+0007FF)
fa6eb6fb4a80 tests: Add UTF-8 validity tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
21 Should pass: EF BF BF # Last valid 3-byte sequence (U+00FFFF)
fa6eb6fb4a80 tests: Add UTF-8 validity tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
22 Should pass: 00 # First valid 1-byte sequence (U+000000)
fa6eb6fb4a80 tests: Add UTF-8 validity tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
23 Should pass: C2 80 # First valid 2-byte sequence (U+000080)
fa6eb6fb4a80 tests: Add UTF-8 validity tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
24 Should pass: E0 A0 80 # First valid 3-byte sequence (U+000800)
fa6eb6fb4a80 tests: Add UTF-8 validity tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
25 Should pass: F0 90 80 80 # First valid 4-byte sequence (U+000800)
fa6eb6fb4a80 tests: Add UTF-8 validity tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
26 Should fail: F8 88 80 80 80 # First 5-byte sequence - invalid per RFC 3629
fa6eb6fb4a80 tests: Add UTF-8 validity tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
27 Should fail: FC 84 80 80 80 80 # First 6-byte sequence - invalid per RFC 3629
fa6eb6fb4a80 tests: Add UTF-8 validity tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
28 Should pass: EF BF BD # U+00FFFD (replacement character)
fa6eb6fb4a80 tests: Add UTF-8 validity tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
29 Should fail: 80 # First continuation byte
fa6eb6fb4a80 tests: Add UTF-8 validity tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
30 Should fail: BF # Last continuation byte
fa6eb6fb4a80 tests: Add UTF-8 validity tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
31 Should fail: 80 BF # 2 continuation bytes
fa6eb6fb4a80 tests: Add UTF-8 validity tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
32 Should fail: 80 BF 80 # 3 continuation bytes
fa6eb6fb4a80 tests: Add UTF-8 validity tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
33 Should fail: 80 BF 80 BF # 4 continuation bytes
fa6eb6fb4a80 tests: Add UTF-8 validity tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
34 Should fail: 80 BF 80 BF 80 # 5 continuation bytes
fa6eb6fb4a80 tests: Add UTF-8 validity tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
35 Should fail: 80 BF 80 BF 80 BF # 6 continuation bytes
fa6eb6fb4a80 tests: Add UTF-8 validity tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
36 Should fail: 80 BF 80 BF 80 BF 80 # 7 continuation bytes
fa6eb6fb4a80 tests: Add UTF-8 validity tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
37 Should fail: FE # Impossible byte
fa6eb6fb4a80 tests: Add UTF-8 validity tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
38 Should fail: FF # Impossible byte
fa6eb6fb4a80 tests: Add UTF-8 validity tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
39 Should fail: FE FE FF FF # Impossible bytes
fa6eb6fb4a80 tests: Add UTF-8 validity tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
40 Should fail: C0 AF # Overlong "/"
fa6eb6fb4a80 tests: Add UTF-8 validity tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
41 Should fail: E0 80 AF # Overlong "/"
fa6eb6fb4a80 tests: Add UTF-8 validity tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
42 Should fail: F0 80 80 AF # Overlong "/"
fa6eb6fb4a80 tests: Add UTF-8 validity tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
43 Should fail: F8 80 80 80 AF # Overlong "/"
fa6eb6fb4a80 tests: Add UTF-8 validity tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
44 Should fail: FC 80 80 80 80 AF # Overlong "/"
fa6eb6fb4a80 tests: Add UTF-8 validity tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
45 Should fail: C0 80 AF # Overlong "/" (invalid)
fa6eb6fb4a80 tests: Add UTF-8 validity tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
46 Should fail: C1 BF # Overlong
fa6eb6fb4a80 tests: Add UTF-8 validity tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
47 Should fail: E0 9F BF # Overlong
fa6eb6fb4a80 tests: Add UTF-8 validity tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
48 Should fail: F0 8F BF BF # Overlong
fa6eb6fb4a80 tests: Add UTF-8 validity tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
49 Should fail: F8 87 BF BF BF # Overlong
fa6eb6fb4a80 tests: Add UTF-8 validity tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
50 Should fail: FC 83 BF BF BF BF # Overlong
fa6eb6fb4a80 tests: Add UTF-8 validity tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
51 Should pass: EF BF BE # U+FFFE (invalid unicode, valid UTF-8)
6595
89c764cc2424 utf8_sequences.txt: Oops
Matthew Wild <mwild1@gmail.com>
parents: 6594
diff changeset
52 Should pass: EF BF BF # U+FFFF (invalid unicode, valid UTF-8)