diff options
author | David Mitchell <davem@iabyn.com> | 2012-09-12 12:03:22 +0100 |
---|---|---|
committer | David Mitchell <davem@iabyn.com> | 2012-09-12 12:04:17 +0100 |
commit | 610272b504c200c56babb5b7c6f94c27509aba15 (patch) | |
tree | 4ca2ce0bbdc7eb33a7892ca445f77f5c6bcfa19f /t/re | |
parent | 050862bb322626de7359d0925eb46fb4cb741ec5 (diff) | |
download | perl-610272b504c200c56babb5b7c6f94c27509aba15.tar.gz |
add test for 6502e08, s/(.)/die/e
Forgot to add a test along with the commit that fixed this
Diffstat (limited to 't/re')
-rw-r--r-- | t/re/subst.t | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/t/re/subst.t b/t/re/subst.t index 8fa649dee2..16590b7ee3 100644 --- a/t/re/subst.t +++ b/t/re/subst.t @@ -7,7 +7,7 @@ BEGIN { } require './test.pl'; -plan( tests => 189 ); +plan( tests => 190 ); $_ = 'david'; $a = s/david/rules/r; @@ -798,4 +798,13 @@ is(*bam =~ s/\*//rg, 'main::bam', 'Can s///rg a tyepglob'); tie my $kror, cowBug =>; $kror =~ s/(?:)/""/e; } -pass("s/// on tied var returning a cow") +pass("s/// on tied var returning a cow"); + +# a test for 6502e08109cd003b2cdf39bc94ef35e52203240b +# previously this would segfault + +{ + my $s = "abc"; + eval { $s =~ s/(.)/die/e; }; + like($@, qr/Died at/, "s//die/e"); +} |