This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Two tests from perl #7806.
authorJarkko Hietaniemi <jhi@iki.fi>
Thu, 28 Nov 2002 23:41:54 +0000 (23:41 +0000)
committerJarkko Hietaniemi <jhi@iki.fi>
Thu, 28 Nov 2002 23:41:54 +0000 (23:41 +0000)
p4raw-id: //depot/maint-5.8/perl@18214

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");
+