summaryrefslogtreecommitdiff
path: root/t/op/regexp.t
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2007-02-01 16:49:12 +0000
committerNicholas Clark <nick@ccl4.org>2007-02-01 16:49:12 +0000
commit66fb63c110722b9a2b418e951a2e9c40079471b8 (patch)
tree4f1b184dc2c21d3f9616bb3c089d7dc29485f8a7 /t/op/regexp.t
parent1286eaeb2de3949c39fce40ec1f0140e47e5abe6 (diff)
downloadperl-66fb63c110722b9a2b418e951a2e9c40079471b8.tar.gz
Make t/op/regexp.t warnings clean.
p4raw-id: //depot/perl@30089
Diffstat (limited to 't/op/regexp.t')
-rwxr-xr-xt/op/regexp.t10
1 files changed, 9 insertions, 1 deletions
diff --git a/t/op/regexp.t b/t/op/regexp.t
index f416f29560..d011173beb 100755
--- a/t/op/regexp.t
+++ b/t/op/regexp.t
@@ -42,6 +42,7 @@ BEGIN {
@INC = '../lib';
}
use strict;
+use warnings FATAL=>"all";
use vars qw($iters $numtests $bang $ffff $nulnul $OP);
use vars qw($qr $skip_amp $qr_embed); # set by our callers
@@ -72,6 +73,7 @@ while (<TESTS>) {
chomp;
s/\\n/\n/g;
my ($pat, $subject, $result, $repl, $expect, $reason) = split(/\t/,$_,6);
+ $reason = '' unless defined $reason;
my $input = join(':',$pat,$subject,$result,$repl,$expect);
$pat = "'$pat'" unless $pat =~ /^[:'\/]/;
$pat =~ s/(\$\{\w+\})/$1/eeg;
@@ -109,7 +111,13 @@ EOFCODE
\$got = "$repl";
EOFCODE
}
- eval $code;
+ {
+ # Probably we should annotate specific tests with which warnings
+ # categories they're known to trigger, and hence should be
+ # disabled just for that test
+ no warnings qw(uninitialized regexp);
+ eval $code;
+ }
chomp( my $err = $@ );
if ($result eq 'c') {
if ($err !~ m!^\Q$expect!) { print "not ok $. (compile) $input => `$err'\n"; next TEST }