integrate 5.8-maint: changes #18174 18187 18189-92 18202 18209 18214-5
[p5sagit/p5-mst-13.2.git] / t / op / subst.t
index 63fb6c6..ef0ae0a 100755 (executable)
@@ -7,7 +7,7 @@ BEGIN {
 }
 
 require './test.pl';
-plan( tests => 122 );
+plan( tests => 124 );
 
 $x = 'foo';
 $_ = "x";
@@ -491,3 +491,12 @@ SKIP: {
     is($b, "$na--$na--$nb", "s///: replace long non-utf8 into non-utf8 (utf8 pattern)");
 }
 
+$_ = 'aaaa';
+$r = 'x';
+$s = s/a(?{})/$r/g;
+is("<$_> <$s>", "<xxxx> <4>", "perl #7806");
+
+$_ = 'aaaa';
+$s = s/a(?{})//g;
+is("<$_> <$s>", "<> <4>", "perl #7806");
+