From 409c6472cedc6771a158a61dbbf8154d0246dc5b Mon Sep 17 00:00:00 2001 From: Yves Orton Date: Sun, 14 Sep 2014 18:55:12 +0200 Subject: [PATCH] add test for rt122747 --- MANIFEST | 1 + t/re/rt122747.t | 29 +++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 t/re/rt122747.t diff --git a/MANIFEST b/MANIFEST index 437f384e5964..eb29a941febe 100644 --- a/MANIFEST +++ b/MANIFEST @@ -5300,6 +5300,7 @@ t/re/reg_nc_tie.t Test the tied methods of Tie::Hash::NamedCapture t/re/reg_pmod.t See if regexp /p modifier works as expected t/re/reg_posixcc.t See if posix character classes behave consistently t/re/re_tests Regular expressions for regexp.t +t/re/rt122747.t Test rt122747 assert faile (requires DEBUGGING) t/re/rxcode.t See if /(?{ code })/ works t/re/subst_amp.t See if $&-related substitution works t/re/subst.t See if substitution works diff --git a/t/re/rt122747.t b/t/re/rt122747.t new file mode 100644 index 000000000000..b839edd899e4 --- /dev/null +++ b/t/re/rt122747.t @@ -0,0 +1,29 @@ +#!./perl +use strict; +use warnings; + +$| = 1; + + +BEGIN { + chdir 't' if -d 't'; + @INC = ('../lib','.','../ext/re'); + require './test.pl'; +} + +plan tests => 3; +use strict; + +my(@body) = ( + "", + "A\x{B9}ker\x{E8}eva xxxx.xxxx\@outlook.com \x{201D}", +); + +for (@body) { + s{ | \s{1,10} (?!phone) [a-z]{2,11} : ) }{ }xgi; + my $got= $1; + is( $got, '.xxxx@outlook.com' ); +} +ok("got to the end without dieing (note without DEBUGGING passing this test means nothing)"); +