fix bug in backtracking optimizer (from Makoto Ishisone
[p5sagit/p5-mst-13.2.git] / t / op / pat.t
index 439796d..142b82e 100755 (executable)
@@ -4,7 +4,7 @@
 # the format supported by op/regexp.t.  If you want to add a test
 # that does fit that format, add it to op/re_tests, not here.
 
-print "1..207\n";
+print "1..210\n";
 
 BEGIN {
     chdir 't' if -d 't';
@@ -978,3 +978,16 @@ $test++;
 print "not " if "@b" ne "@c";
 print "ok $test\n";
 $test++;
+
+# see if backtracking optimization works correctly
+"\n\n" =~ /\n  $ \n/x or print "not ";
+print "ok $test\n";
+$test++;
+
+"\n\n" =~ /\n* $ \n/x or print "not ";
+print "ok $test\n";
+$test++;
+
+"\n\n" =~ /\n+ $ \n/x or print "not ";
+print "ok $test\n";
+$test++;