Commit | Line | Data |
0453d815 |
1 | |
2 | utf8.c AOK |
3 | |
4 | All Mandatory warnings |
5 | |
6 | [utf8_to_uv] |
7 | Malformed UTF-8 character |
8 | my $a = ord "\x80" ; |
9 | |
10 | Malformed UTF-8 character |
11 | my $a = ord "\xf080" ; |
12 | |
13 | [utf16_to_utf8] |
14 | Malformed UTF-16 surrogate |
15 | <<<<<< Add a test when somethig actually calls utf16_to_utf8 |
16 | |
17 | __END__ |
767a6a26 |
18 | # utf8.c [utf8_to_uv] |
0453d815 |
19 | use utf8 ; |
20 | my $a = ord "\x80" ; |
21 | EXPECT |
22 | Malformed UTF-8 character at - line 3. |
23 | ######## |
767a6a26 |
24 | # utf8.c [utf8_to_uv] |
59af8754 |
25 | BEGIN { |
26 | if (ord("\t") == 5) { |
27 | print "SKIPPED\n# Ebcdic platforms have different \\x constructs."; |
28 | exit 0; |
29 | } |
30 | } |
0453d815 |
31 | use utf8 ; |
32 | my $a = ord "\x80" ; |
33 | { |
4438c4b7 |
34 | use warnings 'utf8' ; |
0453d815 |
35 | my $a = ord "\x80" ; |
4438c4b7 |
36 | no warnings 'utf8' ; |
0453d815 |
37 | my $a = ord "\x80" ; |
38 | } |
39 | EXPECT |
dc26be07 |
40 | Malformed UTF-8 character at - line 9. |
41 | \x80 will produce malformed UTF-8 character; use \x{80} for that at - line 12. |
42 | Malformed UTF-8 character at - line 12. |
0453d815 |
43 | ######## |
767a6a26 |
44 | # utf8.c [utf8_to_uv] |
0453d815 |
45 | use utf8 ; |
46 | my $a = ord "\xf080" ; |
47 | EXPECT |
48 | Malformed UTF-8 character at - line 3. |
49 | ######## |
767a6a26 |
50 | # utf8.c [utf8_to_uv] |
59af8754 |
51 | BEGIN { |
52 | if (ord("\t") == 5) { |
53 | print "SKIPPED\n# Ebcdic platforms have different \\x constructs."; |
54 | exit 0; |
55 | } |
56 | } |
0453d815 |
57 | use utf8 ; |
58 | my $a = ord "\xf080" ; |
59 | { |
4438c4b7 |
60 | use warnings 'utf8' ; |
0453d815 |
61 | my $a = ord "\xf080" ; |
4438c4b7 |
62 | no warnings 'utf8' ; |
0453d815 |
63 | my $a = ord "\xf080" ; |
64 | } |
65 | EXPECT |
dc26be07 |
66 | Malformed UTF-8 character at - line 9. |
67 | \xf0 will produce malformed UTF-8 character; use \x{f0} for that at - line 12. |
68 | Malformed UTF-8 character at - line 12. |