runtime now looks at the SVf_UTF8 bit on the SV to decide
[p5sagit/p5-mst-13.2.git] / t / pragma / warn / utf8
CommitLineData
0453d815 1
2 utf8.c AOK
3
0453d815 4 [utf8_to_uv]
5 Malformed UTF-8 character
6 my $a = ord "\x80" ;
7
8 Malformed UTF-8 character
9 my $a = ord "\xf080" ;
7e2040f0 10 <<<<<< this warning can't be easily triggered from perl anymore
0453d815 11
12 [utf16_to_utf8]
13 Malformed UTF-16 surrogate
14 <<<<<< Add a test when somethig actually calls utf16_to_utf8
15
16__END__
767a6a26 17# utf8.c [utf8_to_uv]
0453d815 18use utf8 ;
19my $a = ord "\x80" ;
20EXPECT
0453d815 21########
767a6a26 22# utf8.c [utf8_to_uv]
59af8754 23BEGIN {
24 if (ord("\t") == 5) {
25 print "SKIPPED\n# Ebcdic platforms have different \\x constructs.";
26 exit 0;
27 }
28}
0453d815 29use utf8 ;
30my $a = ord "\x80" ;
31{
4438c4b7 32 use warnings 'utf8' ;
0453d815 33 my $a = ord "\x80" ;
4438c4b7 34 no warnings 'utf8' ;
0453d815 35 my $a = ord "\x80" ;
36}
37EXPECT
dc26be07 38\x80 will produce malformed UTF-8 character; use \x{80} for that at - line 12.
0453d815 39########
767a6a26 40# utf8.c [utf8_to_uv]
0453d815 41use utf8 ;
42my $a = ord "\xf080" ;
43EXPECT
0453d815 44########
767a6a26 45# utf8.c [utf8_to_uv]
59af8754 46BEGIN {
47 if (ord("\t") == 5) {
48 print "SKIPPED\n# Ebcdic platforms have different \\x constructs.";
49 exit 0;
50 }
51}
0453d815 52use utf8 ;
53my $a = ord "\xf080" ;
54{
4438c4b7 55 use warnings 'utf8' ;
0453d815 56 my $a = ord "\xf080" ;
4438c4b7 57 no warnings 'utf8' ;
0453d815 58 my $a = ord "\xf080" ;
59}
60EXPECT
dc26be07 61\xf0 will produce malformed UTF-8 character; use \x{f0} for that at - line 12.