diff options
author | Karl Williamson <public@khwilliamson.com> | 2010-12-05 13:08:33 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2010-12-07 18:52:42 -0800 |
commit | 4d252e65989d9d34bc759c890186b40e14559420 (patch) | |
tree | 06f784a6e8a23d6e08988a93c1bb51ee9073b0b9 /t/uni | |
parent | 9d6ecd7a330475b012bff918b30af2834aec6ea4 (diff) | |
download | perl-4d252e65989d9d34bc759c890186b40e14559420.tar.gz |
uni/fold.t: Prevent [] from being optimized out
This test hasn't been testing bracketed char classes because a single
character class gets optimized out.
Diffstat (limited to 't/uni')
-rw-r--r-- | t/uni/fold.t | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/t/uni/fold.t b/t/uni/fold.t index f6f467cc9c..0f71c803b6 100644 --- a/t/uni/fold.t +++ b/t/uni/fold.t @@ -38,12 +38,13 @@ if (open(CF, $CF)) { my $b = pack("U0U*", map { hex } split " ", $mapping); my $t0 = ":$a:" =~ /:$a:/ ? 1 : 0; my $t1 = ":$a:" =~ /:$a:/i ? 1 : 0; - my $t2 = ":$a:" =~ /:[$a]:/ ? 1 : 0; - my $t3 = ":$a:" =~ /:[$a]:/i ? 1 : 0; + my $t2 = ":$a:" =~ /:[_$a]:/ ? 1 : 0; # Two chars in [] so doesn't get + # optimized to a non-charclass + my $t3 = ":$a:" =~ /:[_$a]:/i ? 1 : 0; my $t4 = ":$a:" =~ /:$b:/i ? 1 : 0; - my $t5 = ":$a:" =~ /:[$b]:/i ? 1 : 0; + my $t5 = ":$a:" =~ /:[_$b]:/i ? 1 : 0; my $t6 = ":$b:" =~ /:$a:/i ? 1 : 0; - my $t7 = ":$b:" =~ /:[$a]:/i ? 1 : 0; + my $t7 = ":$b:" =~ /:[_$a]:/i ? 1 : 0; print $t0 && $t1 && $t2 && $t3 && $t4 && $t5 && $t6 && $t7 ? "ok $i \# - $code - $name - $mapping - $status\n" : "not ok $i \# - $code - $name - $mapping - $status - $t0 $t1 $t2 $t3 $t4 $t5 $t6 $t7\n"; |