diff options
author | Yves Orton <demerphq@gmail.com> | 2014-09-14 18:55:12 +0200 |
---|---|---|
committer | Yves Orton <demerphq@gmail.com> | 2014-09-14 18:55:38 +0200 |
commit | 409c6472cedc6771a158a61dbbf8154d0246dc5b (patch) | |
tree | 0c25e3a61c6da675b2d4a957a43a3df493341c3f /t | |
parent | 5871d0b76ea11085ea273923b26ae46aa4df291e (diff) | |
download | perl-409c6472cedc6771a158a61dbbf8154d0246dc5b.tar.gz |
add test for rt122747
Diffstat (limited to 't')
-rw-r--r-- | t/re/rt122747.t | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/t/re/rt122747.t b/t/re/rt122747.t new file mode 100644 index 0000000000..b839edd899 --- /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) = ( + "<mailto:xxxx.xxxx\@outlook.com>", + "A\x{B9}ker\x{E8}eva xxxx.xxxx\@outlook.com \x{201D}", +); + +for (@body) { + s{ <? (?<!mailto:) \b ( [a-z0-9.]+ \@ \S+ ) \b + (?: > | \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)"); + |