summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorIlya Zakharevich <ilya@math.berkeley.edu>1998-06-21 00:27:16 -0400
committerGurusamy Sarathy <gsar@cpan.org>1998-06-22 00:59:28 +0000
commit7e5428c5eadf5068dae305575a105bd61a84cb5d (patch)
tree6f1c67cd5b099917f7e0c67463e1b5b37d518c12 /t
parent274c75005985b277dc1c9506e79e73f65d8cd586 (diff)
downloadperl-7e5428c5eadf5068dae305575a105bd61a84cb5d.tar.gz
Zero-length matching bug
Message-Id: <199806210827.EAA26322@monk.mps.ohio-state.edu> p4raw-id: //depot/perl@1185
Diffstat (limited to 't')
-rwxr-xr-xt/op/pat.t18
1 files changed, 17 insertions, 1 deletions
diff --git a/t/op/pat.t b/t/op/pat.t
index 9377b9919d..f0bbdbc315 100755
--- a/t/op/pat.t
+++ b/t/op/pat.t
@@ -2,7 +2,7 @@
# $RCSfile: pat.t,v $$Revision: 4.1 $$Date: 92/08/07 18:28:12 $
-print "1..108\n";
+print "1..113\n";
$x = "abc\ndef\n";
@@ -378,6 +378,22 @@ print "not " unless study(/\b\v$/) eq '\bv$';
print "ok $test\n";
$test++;
+$_ = 'xabcx';
+foreach $ans ('', 'c') {
+ /(?<=(?=a)..)((?=c)|.)/g;
+ print "not " unless $1 eq $ans;
+ print "ok $test\n";
+ $test++;
+}
+
+$_ = 'a';
+foreach $ans ('', 'a', '') {
+ /^|a|$/g;
+ print "not " unless $& eq $ans;
+ print "ok $test\n";
+ $test++;
+}
+
sub must_warn_pat {
my $warn_pat = shift;
return sub { print "not " unless $_[0] =~ /$warn_pat/ }