Commit | Line | Data |
---|---|---|
76856ab8 MS |
1 | #!./perl |
2 | ||
aa5e9df8 | 3 | # This is a test for [perl #60508] which I can't figure out where else |
76856ab8 MS |
4 | # to put it or what the underlying problem is, but it has to go somewhere. |
5 | # --Schwern | |
6 | ||
7 | BEGIN { | |
8 | chdir 't' if -d 't'; | |
9 | @INC = '../lib'; | |
10 | require './test.pl'; | |
11 | } | |
12 | ||
13 | use utf8; | |
14 | plan tests => 1; | |
15 | ||
16 | { | |
17 | my $expect = <<"EXPECT"; | |
18 | k1 = .... | |
19 | k2.1 = >\x{2022} | |
20 | k2.2 = \x{2022} | |
21 | EXPECT | |
22 | utf8::encode($expect); | |
23 | ||
0e7d8fda | 24 | #local $TODO = "[perl #60508]"; |
76856ab8 MS |
25 | |
26 | fresh_perl_is(<<'CODE', $expect, {}); | |
27 | binmode STDOUT, ":utf8"; | |
28 | sub f { $_[0] =~ s/([>X])//g; } | |
29 | ||
30 | $k1 = "." x 4 . ">>"; | |
31 | f($k1); | |
32 | print "k1 = $k1\n"; | |
33 | ||
34 | $k2 = "\x{f1}\x{2022}"; | |
35 | $k2 =~ s/([\360-\362])/>/g; | |
36 | print "k2.1 = $k2\n"; | |
37 | f($k2); | |
38 | print "k2.2 = $k2\n"; | |
39 | CODE | |
40 | } |