xref: /openbsd-src/gnu/usr.bin/perl/t/re/rt122747.t (revision f2da64fbbbf1b03f09f390ab01267c93dfd77c4c)
1#!./perl
2use strict;
3use warnings;
4
5$| = 1;
6
7
8BEGIN {
9    chdir 't' if -d 't';
10    @INC = ('../lib','.','../ext/re');
11    require './test.pl';
12}
13
14plan tests => 3;
15use strict;
16
17my(@body) = (
18  "<mailto:xxxx.xxxx\@outlook.com>",
19  "A\x{B9}ker\x{E8}eva xxxx.xxxx\@outlook.com \x{201D}",
20);
21
22for (@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, '.xxxx@outlook.com' );
27}
28ok("got to the end without dieing (note without DEBUGGING passing this test means nothing)");
29
30