summaryrefslogtreecommitdiffstats
path: root/gnu/usr.bin/perl/t/re
diff options
context:
space:
mode:
authorafresh1 <afresh1@openbsd.org>2015-04-25 19:10:05 +0000
committerafresh1 <afresh1@openbsd.org>2015-04-25 19:10:05 +0000
commit5273661442d41c59cfc27ce8fbf8e4fbc91b2dc0 (patch)
tree569a9be267a711da7611a0ac93717627e68f3ec0 /gnu/usr.bin/perl/t/re
parentGet rid of window_choose_list type. (diff)
downloadwireguard-openbsd-5273661442d41c59cfc27ce8fbf8e4fbc91b2dc0.tar.xz
wireguard-openbsd-5273661442d41c59cfc27ce8fbf8e4fbc91b2dc0.zip
Import perl-5.20.2
Diffstat (limited to 'gnu/usr.bin/perl/t/re')
-rw-r--r--gnu/usr.bin/perl/t/re/fold_grind.t3
-rwxr-xr-xgnu/usr.bin/perl/t/re/pat_psycho.t4
-rw-r--r--gnu/usr.bin/perl/t/re/re_tests1
-rw-r--r--gnu/usr.bin/perl/t/re/rt122747.t29
-rwxr-xr-xgnu/usr.bin/perl/t/re/rxcode.t9
-rwxr-xr-xgnu/usr.bin/perl/t/re/uniprops.t5
6 files changed, 50 insertions, 1 deletions
diff --git a/gnu/usr.bin/perl/t/re/fold_grind.t b/gnu/usr.bin/perl/t/re/fold_grind.t
index a7a846cb8bd..74372958557 100644
--- a/gnu/usr.bin/perl/t/re/fold_grind.t
+++ b/gnu/usr.bin/perl/t/re/fold_grind.t
@@ -8,6 +8,9 @@ BEGIN {
require './test.pl';
require Config; import Config;
skip_all_if_miniperl("no dynamic loading on miniperl, no Encode nor POSIX");
+ if ($^O eq 'dec_osf') {
+ skip_all("$^O cannot handle this test");
+ }
require './loc_tools.pl';
}
diff --git a/gnu/usr.bin/perl/t/re/pat_psycho.t b/gnu/usr.bin/perl/t/re/pat_psycho.t
index 55c8776e115..fada30293f1 100755
--- a/gnu/usr.bin/perl/t/re/pat_psycho.t
+++ b/gnu/usr.bin/perl/t/re/pat_psycho.t
@@ -21,10 +21,14 @@ BEGIN {
chdir 't' if -d 't';
@INC = ('../lib','.');
require './test.pl';
+ if ($^O eq 'dec_osf') {
+ skip_all("$^O cannot handle this test");
+ }
}
skip_all('$PERL_SKIP_PSYCHO_TEST set') if $ENV{PERL_SKIP_PSYCHO_TEST};
+
plan tests => 15; # Update this when adding/deleting tests.
run_tests() unless caller;
diff --git a/gnu/usr.bin/perl/t/re/re_tests b/gnu/usr.bin/perl/t/re/re_tests
index d6a8b1204ab..d883add8f0f 100644
--- a/gnu/usr.bin/perl/t/re/re_tests
+++ b/gnu/usr.bin/perl/t/re/re_tests
@@ -1885,6 +1885,7 @@ A+(*PRUNE)BC(?{}) AAABC y $& AAABC
[bcd].{2,3}aaaa Xb\x{100}aaaaa y - -
'\Awibble\z'm wibble y - -
/(alias|status)es$/i Statuses y $1 Status # [perl #121778]
+(.)(?{$~=$^N}) \x{100} y $~ \x{100} # [perl #123135]
# Keep these lines at the end of the file
# vim: softtabstop=0 noexpandtab
diff --git a/gnu/usr.bin/perl/t/re/rt122747.t b/gnu/usr.bin/perl/t/re/rt122747.t
new file mode 100644
index 00000000000..b839edd899e
--- /dev/null
+++ b/gnu/usr.bin/perl/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)");
+
diff --git a/gnu/usr.bin/perl/t/re/rxcode.t b/gnu/usr.bin/perl/t/re/rxcode.t
index 19a859ba390..42cece59f3c 100755
--- a/gnu/usr.bin/perl/t/re/rxcode.t
+++ b/gnu/usr.bin/perl/t/re/rxcode.t
@@ -6,7 +6,7 @@ BEGIN {
require './test.pl';
}
-plan tests => 40;
+plan tests => 42;
$^R = undef;
like( 'a', qr/^a(?{1})(?:b(?{2}))?/, 'a =~ ab?' );
@@ -95,3 +95,10 @@ cmp_ok( scalar(@var), '==', 0, '..still nothing pushed (package)' );
# [perl #78194] $_ in code block aliasing op return values
"$_" =~ /(?{ is \$_, \$_,
'[perl #78194] \$_ == \$_ when $_ aliases "$x"' })/;
+
+@a = 1..3;
+like eval { qr/@a(?{})/ }, qr/1 2 3\(\?\{\}\)/, 'qr/@a(?{})/';
+
+# Not a code block, but looks a bit like one. (Failed an assertion from
+# 5.17.1 to 5.21.6.)
+ok "(?{" =~ qr/\Q(?{/, 'qr/\Q(?{/';
diff --git a/gnu/usr.bin/perl/t/re/uniprops.t b/gnu/usr.bin/perl/t/re/uniprops.t
index 927f8a7ce12..2f1cb441da3 100755
--- a/gnu/usr.bin/perl/t/re/uniprops.t
+++ b/gnu/usr.bin/perl/t/re/uniprops.t
@@ -2,6 +2,11 @@ use strict;
use warnings;
no warnings 'once';
+if ($^O eq 'dec_osf') {
+ print "1..0 # $^O cannot handle this test\n";
+ exit(0);
+}
+
# This is a wrapper for a generated file. Assumes being run from 't'
# directory.