Skip to content

Commit

Permalink
add test for rt122747
Browse files Browse the repository at this point in the history
  • Loading branch information
demerphq committed Sep 14, 2014
1 parent 5871d0b commit 409c647
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
1 change: 1 addition & 0 deletions MANIFEST
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
29 changes: 29 additions & 0 deletions t/re/rt122747.t
Original file line number Diff line number Diff line change
@@ -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)");

0 comments on commit 409c647

Please sign in to comment.