change#4721 needed line number adjustments
[p5sagit/p5-mst-13.2.git] / t / pragma / warn / utf8
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__
18 # utf8.c [utf8_to_uv]
19 use utf8 ;
20 my $a = ord "\x80" ;
21 EXPECT
22 Malformed UTF-8 character at - line 3.
23 ########
24 # utf8.c [utf8_to_uv]
25 BEGIN {
26     if (ord("\t") == 5) {
27         print "SKIPPED\n# Ebcdic platforms have different \\x constructs.";
28         exit 0;
29     }
30 }
31 use utf8 ;
32 my $a = ord "\x80" ;
33 {
34     use warnings 'utf8' ;
35     my $a = ord "\x80" ;
36     no warnings 'utf8' ;
37     my $a = ord "\x80" ;
38 }
39 EXPECT
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.
43 ########
44 # utf8.c [utf8_to_uv]
45 use utf8 ;
46 my $a = ord "\xf080" ;
47 EXPECT
48 Malformed UTF-8 character at - line 3.
49 ########
50 # utf8.c [utf8_to_uv]
51 BEGIN {
52     if (ord("\t") == 5) {
53         print "SKIPPED\n# Ebcdic platforms have different \\x constructs.";
54         exit 0;
55     }
56 }
57 use utf8 ;
58 my $a = ord "\xf080" ;
59 {
60     use warnings 'utf8' ;
61     my $a = ord "\xf080" ;
62     no warnings 'utf8' ;
63     my $a = ord "\xf080" ;
64 }
65 EXPECT
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.