This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Testing every pattern by also upgrading to UTF-8 would have caught the
authorNicholas Clark <nick@ccl4.org>
Fri, 2 Feb 2007 16:25:23 +0000 (16:25 +0000)
committerNicholas Clark <nick@ccl4.org>
Fri, 2 Feb 2007 16:25:23 +0000 (16:25 +0000)
bug added by change 29502, fixed in change 30092.

p4raw-id: //depot/perl@30093

t/op/regexp.t

index 1b5ac5b..919a239 100755 (executable)
@@ -97,7 +97,11 @@ foreach (@tests) {
     $reason = 'skipping $&' if $reason eq  '' && $skip_amp;
     $result =~ s/B//i unless $skip;
 
-    for my $study ('', 'study $subject') {
+    for my $study ('', 'study $subject', 'utf8::upgrade($subject)',
+                  'utf8::upgrade($subject); study $subject') {
+       # Need to make a copy, else the utf8::upgrade of an alreay studied
+       # scalar confuses things.
+       my $subject = $subject;
        my $c = $iters;
        my ($code, $match, $got);
         if ($repl eq 'pos') {