More memory lane.
[p5sagit/p5-mst-13.2.git] / t / op / regexp.t
index 7fbfc97..3cebee9 100755 (executable)
@@ -1,8 +1,5 @@
 #!./perl
 
-# XXX known to leak scalars
-$ENV{PERL_DESTRUCT_LEVEL} = 0 unless $ENV{PERL_DESTRUCT_LEVEL} > 3;
-
 # The tests are in a separate file 't/op/re_tests'.
 # Each line in that file is a separate test.
 # There are five columns, separated by tabs.
@@ -41,7 +38,7 @@ BEGIN {
 
 $iters = shift || 1;           # Poor man performance suite, 10000 is OK.
 
-open(TESTS,'op/re_tests') || open(TESTS,'t/op/re_tests') ||
+open(TESTS,'op/re_tests') || open(TESTS,'t/op/re_tests') || open(TESTS,':op:re_tests') ||
        die "Can't open re_tests";
 
 while (<TESTS>) { }
@@ -72,9 +69,7 @@ while (<TESTS>) {
     $expect =~ s/\\n/\n/g;
     $expect = $repl = '-' if $skip_amp and $input =~ /\$[&\`\']/;
     $skip = ($skip_amp ? ($result =~ s/B//i) : ($result =~ s/B//));
-    # Certain tests don't work with utf8 (the re_test should be in UTF8)
-    $skip = 1, $reason = 'utf8'
-      if ($^H &= ~0x00000008) && $pat =~ /\[:\^(alnum|print|word|ascii|xdigit):\]/;
+    $reason = 'skipping $&' if $reason eq  '' && $skip_amp;
     $result =~ s/B//i unless $skip;
     for $study ('', 'study \$subject') {
        $c = $iters;