In perl.git, the branch maint-5.20 has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/26dc6d091d4df225b3dab6efcf9a74763189622e?hp=e98884d13a56f7b35d6a79a1d442dcdf0439e23b>

- Log -----------------------------------------------------------------
commit 26dc6d091d4df225b3dab6efcf9a74763189622e
Author: Yves Orton <[email protected]>
Date:   Sun Sep 14 18:55:12 2014 +0200

    add test for rt122747
-----------------------------------------------------------------------

Summary of changes:
 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 6da1d24..b29a799 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -5434,6 +5434,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 0000000..b839edd
--- /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, '[email protected]' );
+}
+ok("got to the end without dieing (note without DEBUGGING passing this test 
means nothing)");
+

--
Perl5 Master Repository

Reply via email to