summaryrefslogtreecommitdiff
path: root/t/op/pat.t
diff options
context:
space:
mode:
Diffstat (limited to 't/op/pat.t')
-rwxr-xr-xt/op/pat.t29
1 files changed, 28 insertions, 1 deletions
diff --git a/t/op/pat.t b/t/op/pat.t
index c3024a2f2d..1d2e632e6a 100755
--- a/t/op/pat.t
+++ b/t/op/pat.t
@@ -5,7 +5,7 @@
# that does fit that format, add it to op/re_tests, not here.
$| = 1;
-print "1..581\n";
+print "1..586\n";
BEGIN {
chdir 't' if -d 't';
@@ -1547,3 +1547,30 @@ print "ok 247\n";
print "ok 581\n";
}
+
+{
+ $test = 582;
+
+ # bugid 20010410.006
+ for my $rx (
+ '/(.*?)\{(.*?)\}/csg',
+ '/(.*?)\{(.*?)\}/cg',
+ '/(.*?)\{(.*?)\}/sg',
+ '/(.*?)\{(.*?)\}/g',
+ '/(.+?)\{(.+?)\}/csg',
+ )
+ {
+ my($input, $i);
+
+ $i = 0;
+ $input = "a{b}c{d}";
+ eval <<EOT;
+ while (eval \$input =~ $rx) {
+ print "# \\\$1 = '\$1' \\\$2 = '\$2'\n";
+ ++\$i;
+ }
+EOT
+ print "not " unless $i == 2;
+ print "ok " . $test++ . "\n";
+ }
+}