From: Nicholas Clark Date: Fri, 2 Feb 2007 16:25:23 +0000 (+0000) Subject: Testing every pattern by also upgrading to UTF-8 would have caught the X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=52e3301553fd75a357b90153aa727915aa35751e;p=p5sagit%2Fp5-mst-13.2.git Testing every pattern by also upgrading to UTF-8 would have caught the bug added by change 29502, fixed in change 30092. p4raw-id: //depot/perl@30093 --- diff --git a/t/op/regexp.t b/t/op/regexp.t index 1b5ac5b..919a239 100755 --- a/t/op/regexp.t +++ b/t/op/regexp.t @@ -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') {