diff options
author | Hugo van der Sanden <hv@crypt.org> | 1999-01-21 12:08:01 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 1999-01-21 16:12:38 +0000 |
commit | e9fa98b27b08c227248dead8a754ba7c9269fec0 (patch) | |
tree | f6e2517d6cebffbb38021264726abffac9f4d061 /t/op/subst.t | |
parent | a10dc3f494965a782b5e7eb467cb480dd665411d (diff) | |
download | perl-e9fa98b27b08c227248dead8a754ba7c9269fec0.tar.gz |
Re: [PATCH 5.005_54] Evalled substitution parsing
To: perl5-porters@perl.org
Message-Id: <199901211208.MAA01228@crypt.compulink.co.uk>
p4raw-id: //depot/cfgperl@2670
Diffstat (limited to 't/op/subst.t')
-rwxr-xr-x | t/op/subst.t | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/t/op/subst.t b/t/op/subst.t index 6b3ce5852f..6776a1e59b 100755 --- a/t/op/subst.t +++ b/t/op/subst.t @@ -6,7 +6,7 @@ BEGIN { require Config; import Config; } -print "1..91\n"; +print "1..93\n"; $x = 'foo'; $_ = "x"; @@ -451,3 +451,9 @@ $a =~ s/\Ga(?{push @res, $_, $`})/x1/e; print "#'$a' '@res'\nnot " unless "$a @res" eq 'axa aaa a'; print "ok 91\n"; +eval q% s/a/"b"}/e %; +print ($@ =~ /Bad evalled substitution/ ? "ok 92\n" : "not ok 92\n"); +eval q% ($_ = "x") =~ s/(.)/"$1 "/e %; +print +($_ eq "x " and !length $@) ? "ok 93\n" : "not ok 93\n# \$_ eq $_, $@\n"; + + |