summaryrefslogtreecommitdiffstats
path: root/gnu/usr.bin/perl/t/re/regex_sets_compat.t
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/usr.bin/perl/t/re/regex_sets_compat.t')
-rw-r--r--gnu/usr.bin/perl/t/re/regex_sets_compat.t15
1 files changed, 15 insertions, 0 deletions
diff --git a/gnu/usr.bin/perl/t/re/regex_sets_compat.t b/gnu/usr.bin/perl/t/re/regex_sets_compat.t
new file mode 100644
index 00000000000..27eb309af0d
--- /dev/null
+++ b/gnu/usr.bin/perl/t/re/regex_sets_compat.t
@@ -0,0 +1,15 @@
+#!./perl
+
+# This tests that the (?[...]) feature doesn't introduce unexpected
+# differences from regular bracketed character classes. It just sets a flag
+# and calls regexp.t which will run through its test suite, modifiying the
+# tests to use (?[...]) instead wherever the test uses [].
+
+BEGIN { $regex_sets = 1; }
+for $file ('./re/regexp.t', './t/re/regexp.t', ':re:regexp.t') {
+ if (-r $file) {
+ do $file or die $@;
+ exit;
+ }
+}
+die "Cannot find ./re/regexp.t or ./t/re/regexp.t\n";