Commit | Line | Data |
---|---|---|
3a2263fe RGS |
1 | BEGIN { |
2 | chdir 't'; | |
3 | @INC = '../lib'; | |
4 | require './test.pl'; | |
5 | } | |
6 | ||
a6f87d8c KW |
7 | plan tests => 5; |
8 | ||
9 | %utf8::ToSpecUpper = ( | |
10 | "s" => "SS", # Make sure can handle weird ASCII translations | |
11 | ); | |
3a2263fe RGS |
12 | |
13 | sub ToUpper { | |
14 | return <<END; | |
15 | 0061 0063 0041 | |
16 | END | |
17 | } | |
18 | ||
19 | is("\Ufoo\x{101}", "foo\x{101}", "no changes on 'foo'"); | |
20 | is("\Ubar\x{101}", "BAr\x{101}", "changing 'ab' on 'bar' "); | |
a6f87d8c KW |
21 | my $s = 's'; |
22 | utf8::upgrade $s; | |
23 | is(uc($s), "SS", "Verify uc('s') is 'SS' with our weird xlation, and utf8"); | |
3a2263fe RGS |
24 | |
25 | sub ToLower { | |
26 | return <<END; | |
27 | 0041 0061 | |
28 | END | |
29 | } | |
30 | ||
31 | is("\LFOO\x{100}", "FOO\x{100}", "no changes on 'FOO'"); | |
32 | is("\LBAR\x{100}", "BaR\x{100}", "changing 'A' on 'BAR' "); | |
33 |