Skip to content

Commit 409c647

Browse files
committed
add test for rt122747
1 parent 5871d0b commit 409c647

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

MANIFEST

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5300,6 +5300,7 @@ t/re/reg_nc_tie.t Test the tied methods of Tie::Hash::NamedCapture
53005300
t/re/reg_pmod.t See if regexp /p modifier works as expected
53015301
t/re/reg_posixcc.t See if posix character classes behave consistently
53025302
t/re/re_tests Regular expressions for regexp.t
5303+
t/re/rt122747.t Test rt122747 assert faile (requires DEBUGGING)
53035304
t/re/rxcode.t See if /(?{ code })/ works
53045305
t/re/subst_amp.t See if $&-related substitution works
53055306
t/re/subst.t See if substitution works

t/re/rt122747.t

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#!./perl
2+
use strict;
3+
use warnings;
4+
5+
$| = 1;
6+
7+
8+
BEGIN {
9+
chdir 't' if -d 't';
10+
@INC = ('../lib','.','../ext/re');
11+
require './test.pl';
12+
}
13+
14+
plan tests => 3;
15+
use strict;
16+
17+
my(@body) = (
18+
"<mailto:xxxx.xxxx\@outlook.com>",
19+
"A\x{B9}ker\x{E8}eva xxxx.xxxx\@outlook.com \x{201D}",
20+
);
21+
22+
for (@body) {
23+
s{ <? (?<!mailto:) \b ( [a-z0-9.]+ \@ \S+ ) \b
24+
(?: > | \s{1,10} (?!phone) [a-z]{2,11} : ) }{ }xgi;
25+
my $got= $1;
26+
is( $got, '[email protected]' );
27+
}
28+
ok("got to the end without dieing (note without DEBUGGING passing this test means nothing)");
29+

0 commit comments

Comments
 (0)