change#4721 needed line number adjustments
[p5sagit/p5-mst-13.2.git] / t / pragma / warn / utf8
CommitLineData
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 19use utf8 ;
20my $a = ord "\x80" ;
21EXPECT
22Malformed UTF-8 character at - line 3.
23########
767a6a26 24# utf8.c [utf8_to_uv]
59af8754 25BEGIN {
26 if (ord("\t") == 5) {
27 print "SKIPPED\n# Ebcdic platforms have different \\x constructs.";
28 exit 0;
29 }
30}
0453d815 31use utf8 ;
32my $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}
39EXPECT
dc26be07 40Malformed UTF-8 character at - line 9.
41\x80 will produce malformed UTF-8 character; use \x{80} for that at - line 12.
42Malformed UTF-8 character at - line 12.
0453d815 43########
767a6a26 44# utf8.c [utf8_to_uv]
0453d815 45use utf8 ;
46my $a = ord "\xf080" ;
47EXPECT
48Malformed UTF-8 character at - line 3.
49########
767a6a26 50# utf8.c [utf8_to_uv]
59af8754 51BEGIN {
52 if (ord("\t") == 5) {
53 print "SKIPPED\n# Ebcdic platforms have different \\x constructs.";
54 exit 0;
55 }
56}
0453d815 57use utf8 ;
58my $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}
65EXPECT
dc26be07 66Malformed UTF-8 character at - line 9.
67\xf0 will produce malformed UTF-8 character; use \x{f0} for that at - line 12.
68Malformed UTF-8 character at - line 12.