diff options
author | Nicholas Clark <nick@ccl4.org> | 2011-12-03 11:59:05 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2011-12-03 11:59:05 +0000 |
commit | 7e1dab6a61131a77ad847a43dacb66e48b0ab716 (patch) | |
tree | dcd9f2604df8724c88197b2f92ae38aae51dec70 /t | |
parent | 9b9f19dadd2a59689b19ce551651f10aa8d97c32 (diff) | |
download | perl-7e1dab6a61131a77ad847a43dacb66e48b0ab716.tar.gz |
Tidy up t/re/regexp.t
Eliminate the declaration of $numtests, unused since commit 1a6108908b085da4.
Convert $iters and $OP to lexicals. Remove the vestigial logic for finding
t/re/re_tests - the MacOS classic style pathname is redundant now, and the
file can never be found at t/re/re_tests given that there is a chdir 't' in
the BEGIN block.
Diffstat (limited to 't')
-rw-r--r-- | t/re/regexp.t | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/t/re/regexp.t b/t/re/regexp.t index 3e5c6f8740..c54c5a356e 100644 --- a/t/re/regexp.t +++ b/t/re/regexp.t @@ -44,7 +44,7 @@ # Note that columns 2,3 and 5 are all enclosed in double quotes and then # evalled; so something like a\"\x{100}$1 has length 3+length($1). -my $file; +my ($file, $iters); BEGIN { $iters = shift || 1; # Poor man performance suite, 10000 is OK. @@ -66,13 +66,12 @@ sub _comment { use strict; use warnings FATAL=>"all"; -use vars qw($iters $numtests $bang $ffff $nulnul $OP); +use vars qw($bang $ffff $nulnul); # used by the tests use vars qw($qr $skip_amp $qr_embed $qr_embed_thr); # set by our callers if (!defined $file) { - open(TESTS,'re/re_tests') || open(TESTS,'t/re/re_tests') - || open(TESTS,':re:re_tests') || die "Can't open re_tests"; + open TESTS, 're/re_tests' or die "Can't open re/re_tests: $!"; } my @tests = <TESTS>; @@ -82,7 +81,7 @@ close TESTS; $bang = sprintf "\\%03o", ord "!"; # \41 would not be portable. $ffff = chr(0xff) x 2; $nulnul = "\0" x 2; -$OP = $qr ? 'qr' : 'm'; +my $OP = $qr ? 'qr' : 'm'; $| = 1; printf "1..%d\n# $iters iterations\n", scalar @tests; |