The #10251 wasn't quite up-to-the-code.
[p5sagit/p5-mst-13.2.git] / t / op / misc.t
index 4ff0bf4..9248930 100755 (executable)
@@ -258,6 +258,15 @@ my @a; $a[2] = 1; for (@a) { $_ = 2 } print "@a\n"
 EXPECT
 2 2 2
 ########
+# used to attach defelem magic to all immortal values,
+# which made restore of local $_ fail.
+foo(2>1);
+sub foo { bar() for @_;  }
+sub bar { local $_; }
+print "ok\n";
+EXPECT
+ok
+########
 @a = ($a, $b, $c, $d) = (5, 6);
 print "ok\n"
   if ($a[0] == 5 and $a[1] == 6 and !defined $a[2] and !defined $a[3]);
@@ -349,7 +358,7 @@ print "you die joe!\n" unless "@x" eq 'x y z';
 /(?{"{"})/     # Check it outside of eval too
 EXPECT
 Sequence (?{...}) not terminated or not {}-balanced at - line 1, within pattern
-Sequence (?{...}) not terminated or not {}-balanced before HERE mark in regex m/(?{ << HERE "{"})/ at - line 1.
+Sequence (?{...}) not terminated or not {}-balanced in regex; marked by <-- HERE in m/(?{ <-- HERE "{"})/ at - line 1.
 ########
 /(?{"{"}})/    # Check it outside of eval too
 EXPECT
@@ -646,4 +655,36 @@ new_pmop "abcdef"; reset;
 new_pmop "abcdef"; reset;
 new_pmop "abcdef"; reset;
 new_pmop "abcdef"; reset;
-
+########
+# David Dyck
+# coredump in 5.7.1
+close STDERR; die;
+EXPECT
+########
+-w
+"x" =~ /(\G?x)?/;      # core dump in 20000716.007
+EXPECT
+Quantifier unexpected on zero-length expression in regex; marked by <-- HERE in m/(\G?x)? <-- HERE / at - line 2.
+########
+# Bug 20010515.004
+my @h = 1 .. 10;
+bad(@h);
+sub bad {
+   undef @h;
+   print "O";
+   print for @_;
+   print "K";
+}
+EXPECT
+OK
+########
+# Bug 20010506.041
+"abcd\x{1234}" =~ /(a)(b[c])(d+)?/i and print "ok\n";
+EXPECT
+ok
+########
+# Bug 20010422.005
+{s//${}/; //}
+EXPECT
+syntax error at - line 2, near "${}"
+Execution of - aborted due to compilation errors.