diff options
author | Larry Wall <lwall@netlabs.com> | 1991-06-09 12:36:21 +0000 |
---|---|---|
committer | Larry Wall <lwall@netlabs.com> | 1991-06-09 12:36:21 +0000 |
commit | 1462b684862954f3522657efc93a3264698e4a9f (patch) | |
tree | c92554143d0076f4bd8a6f41f8caa3315eef035d /t/op/regexp.t | |
parent | d48672a2009b4897fb5bf74d6723c050cdd015e0 (diff) | |
download | perl-1462b684862954f3522657efc93a3264698e4a9f.tar.gz |
perl 4.0 patch 10: (combined patch)
Subject: pack(hh,1) dumped core
Subject: read didn't work from character special files open for writing
Subject: close-on-exec wrongly set on system file descriptors
Subject: //g only worked first time through
Subject: perl -v printed incorrect copyright notice
Subject: certain pattern optimizations were botched
Subject: documented some newer features in addenda
Subject: $) and $| incorrectly handled in run-time patterns
Subject: added tests for case-insensitive regular expressions
Subject: m'$foo' now treats string as single quoted
Diffstat (limited to 't/op/regexp.t')
-rw-r--r-- | t/op/regexp.t | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/t/op/regexp.t b/t/op/regexp.t index 92f084a7f0..e488a82a61 100644 --- a/t/op/regexp.t +++ b/t/op/regexp.t @@ -1,6 +1,6 @@ #!./perl -# $Header: regexp.t,v 4.0 91/03/20 01:54:22 lwall Locked $ +# $RCSfile: regexp.t,v $$Revision: 4.0.1.1 $$Date: 91/06/10 01:30:29 $ open(TESTS,'op/re_tests') || open(TESTS,'t/op/re_tests') || die "Can't open re_tests"; @@ -11,10 +11,12 @@ close(TESTS); print "1..$numtests\n"; open(TESTS,'op/re_tests') || open(TESTS,'t/op/re_tests') || die "Can't open re_tests"; +$| = 1; while (<TESTS>) { ($pat, $subject, $result, $repl, $expect) = split(/[\t\n]/,$_); $input = join(':',$pat,$subject,$result,$repl,$expect); - eval "\$match = (\$subject =~ \$pat); \$got = \"$repl\";"; + $pat = "'$pat'" unless $pat =~ /^'/; + eval "\$match = (\$subject =~ m$pat); \$got = \"$repl\";"; if ($result eq 'c') { if ($@ ne '') {print "ok $.\n";} else {print "not ok $.\n";} } |