move regex related tests out of t/op/ into t/re/
Yves Orton [Thu, 10 Sep 2009 18:39:13 +0000 (20:39 +0200)]
46 files changed:
MANIFEST
Makefile.SH
pod/perlhack.pod
t/TEST
t/harness
t/op/regexp_noamp.t [deleted file]
t/op/regexp_qr.t [deleted file]
t/op/regexp_qr_embed.t [deleted file]
t/op/regexp_qr_embed_thr.t [deleted file]
t/op/substT.t [deleted file]
t/op/subst_wamp.t [deleted file]
t/re/pat.t [moved from t/op/pat.t with 100% similarity]
t/re/pat_thr.t [moved from t/op/pat_thr.t with 100% similarity]
t/re/qr.t [moved from t/op/qr.t with 100% similarity]
t/re/qr_gc.t [moved from t/op/qr_gc.t with 100% similarity]
t/re/qrstack.t [moved from t/op/qrstack.t with 100% similarity]
t/re/re.t [moved from t/op/re.t with 100% similarity]
t/re/re_tests [moved from t/op/re_tests with 100% similarity]
t/re/reg_60508.t [moved from t/op/reg_60508.t with 100% similarity]
t/re/reg_email.t [moved from t/op/reg_email.t with 100% similarity]
t/re/reg_email_thr.t [moved from t/op/reg_email_thr.t with 100% similarity]
t/re/reg_fold.t [moved from t/op/reg_fold.t with 100% similarity]
t/re/reg_mesg.t [moved from t/op/reg_mesg.t with 100% similarity]
t/re/reg_namedcapture.t [moved from t/op/reg_namedcapture.t with 100% similarity]
t/re/reg_nc_tie.t [moved from t/op/reg_nc_tie.t with 100% similarity]
t/re/reg_pmod.t [moved from t/op/reg_pmod.t with 100% similarity]
t/re/reg_posixcc.t [moved from t/op/reg_posixcc.t with 100% similarity]
t/re/reg_unsafe.t [moved from t/op/reg_unsafe.t with 100% similarity]
t/re/regexp.t [moved from t/op/regexp.t with 98% similarity]
t/re/regexp_noamp.t [new file with mode: 0644]
t/re/regexp_notrie.t [moved from t/op/regexp_notrie.t with 57% similarity]
t/re/regexp_qr.t [new file with mode: 0644]
t/re/regexp_qr_embed.t [new file with mode: 0644]
t/re/regexp_qr_embed_thr.t [new file with mode: 0644]
t/re/regexp_trielist.t [moved from t/op/regexp_trielist.t with 59% similarity]
t/re/regexp_unicode_prop.t [moved from t/op/regexp_unicode_prop.t with 100% similarity]
t/re/regexp_unicode_prop_thr.t [moved from t/op/regexp_unicode_prop_thr.t with 100% similarity]
t/re/rxcode.t [moved from t/op/rxcode.t with 100% similarity]
t/re/subst.t [moved from t/op/subst.t with 100% similarity]
t/re/substT.t [new file with mode: 0644]
t/re/subst_amp.t [moved from t/op/subst_amp.t with 100% similarity]
t/re/subst_wamp.t [new file with mode: 0644]
t/re/substr.t [moved from t/op/substr.t with 100% similarity]
t/re/substr_thr.t [moved from t/op/substr_thr.t with 100% similarity]
win32/Makefile
win32/makefile.mk

index e555b62..6bf3312 100644 (file)
--- a/MANIFEST
+++ b/MANIFEST
@@ -4314,16 +4314,16 @@ t/op/or.t                       See if || works in weird situations
 t/op/overload_integer.t                        See if overload::constant for integer works after "use".   
 t/op/override.t                        See if operator overriding works
 t/op/pack.t                    See if pack and unpack work
-t/op/pat.t                     See if esoteric patterns work
-t/op/pat_thr.t                 See if esoteric patterns work in another thread
+t/re/pat.t                     See if esoteric patterns work
+t/re/pat_thr.t                 See if esoteric patterns work in another thread
 t/op/pos.t                     See if pos works
 t/op/pow.t                     See if ** works
 t/op/push.t                    See if push and pop work
 t/op/pwent.t                   See if getpw*() functions work
 t/op/qq.t                      See if qq works
-t/op/qr_gc.t                   See if qr doesn't leak
-t/op/qrstack.t                 See if qr expands the stack properly
-t/op/qr.t                      See if qr works
+t/re/qr_gc.t                   See if qr doesn't leak
+t/re/qrstack.t                 See if qr expands the stack properly
+t/re/qr.t                      See if qr works
 t/op/quotemeta.t               See if quotemeta works
 t/op/rand.t                    See if rand works
 t/op/range.t                   See if .. works
@@ -4332,32 +4332,32 @@ t/op/readline.t                 See if <> / readline / rcatline work
 t/op/read.t                    See if read() works
 t/op/recurse.t                 See if deep recursion works
 t/op/ref.t                     See if refs and objects work
-t/op/reg_60508.t               See if bug #60508 is fixed
-t/op/reg_email.t               See if regex recursion works by parsing email addresses
-t/op/reg_email_thr.t           See if regex recursion works by parsing email addresses in another thread
-t/op/regexp_noamp.t            See if regular expressions work with optimizations
-t/op/regexp_notrie.t           See if regular expressions work without trie optimisation
-t/op/regexp_qr_embed.t         See if regular expressions work with embedded qr//
-t/op/regexp_qr_embed_thr.t     See if regular expressions work with embedded qr// in another thread
-t/op/regexp_qr.t               See if regular expressions work as qr//
-t/op/regexp.t                  See if regular expressions work
-t/op/regexp_trielist.t         See if regular expressions work with trie optimisation
-t/op/regexp_unicode_prop.t     See if unicode properties work in regular expressions as expected
-t/op/regexp_unicode_prop_thr.t See if unicode properties work in regular expressions as expected under threads
-t/op/reg_fold.t                        See if case folding works properly
-t/op/reg_mesg.t                        See if one can get regular expression errors
-t/op/reg_namedcapture.t                Make sure glob assignment doesn't break named capture
-t/op/reg_nc_tie.t              Test the tied methods of Tie::Hash::NamedCapture
-t/op/reg_pmod.t                        See if regexp /p modifier works as expected
-t/op/reg_posixcc.t             See if posix character classes behave consistantly
-t/op/reg_unsafe.t              Check for unsafe match vars
+t/re/reg_60508.t               See if bug #60508 is fixed
+t/re/reg_email.t               See if regex recursion works by parsing email addresses
+t/re/reg_email_thr.t           See if regex recursion works by parsing email addresses in another thread
+t/re/regexp_noamp.t            See if regular expressions work with optimizations
+t/re/regexp_notrie.t           See if regular expressions work without trie optimisation
+t/re/regexp_qr_embed.t         See if regular expressions work with embedded qr//
+t/re/regexp_qr_embed_thr.t     See if regular expressions work with embedded qr// in another thread
+t/re/regexp_qr.t               See if regular expressions work as qr//
+t/re/regexp.t                  See if regular expressions work
+t/re/regexp_trielist.t         See if regular expressions work with trie optimisation
+t/re/regexp_unicode_prop.t     See if unicode properties work in regular expressions as expected
+t/re/regexp_unicode_prop_thr.t See if unicode properties work in regular expressions as expected under threads
+t/re/reg_fold.t                        See if case folding works properly
+t/re/reg_mesg.t                        See if one can get regular expression errors
+t/re/reg_namedcapture.t                Make sure glob assignment doesn't break named capture
+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 consistantly
+t/re/reg_unsafe.t              Check for unsafe match vars
 t/op/repeat.t                  See if x operator works
 t/op/reset.t                   See if reset operator works
-t/op/re.t                      See if exportable 're' funcs in universal.c work
-t/op/re_tests                  Regular expressions for regexp.t
+t/re/re.t                      See if exportable 're' funcs in universal.c work
+t/re/re_tests                  Regular expressions for regexp.t
 t/op/reverse.t                 See if reverse operator works
 t/op/runlevel.t                        See if die() works from perl_call_*()
-t/op/rxcode.t                  See if /(?{ code })/ works
+t/re/rxcode.t                  See if /(?{ code })/ works
 t/op/setpgrpstack.t            See if setpgrp works
 t/op/sleep.t                   See if sleep works
 t/op/smartmatch.t              See if the ~~ operator works
@@ -4374,12 +4374,12 @@ t/op/stat.t                     See if stat works
 t/op/study.t                   See if study works
 t/op/studytied.t               See if study works with tied scalars
 t/op/sub_lval.t                        See if lvalue subroutines work
-t/op/subst_amp.t               See if $&-related substitution works
-t/op/substr.t                  See if substr works
-t/op/substr_thr.t              See if substr works in another thread
-t/op/subst.t                   See if substitution works
-t/op/substT.t                  See if substitution works with -T
-t/op/subst_wamp.t              See if substitution works with $& present
+t/re/subst_amp.t               See if $&-related substitution works
+t/re/substr.t                  See if substr works
+t/re/substr_thr.t              See if substr works in another thread
+t/re/subst.t                   See if substitution works
+t/re/substT.t                  See if substitution works with -T
+t/re/subst_wamp.t              See if substitution works with $& present
 t/op/sub.t                     See if subroutines work
 t/op/switch.t                  See if switches (given/when) work
 t/op/symbolcache.t             See if undef/delete works on stashes with functions
index 1ab2d22..76c5aba 100644 (file)
@@ -1438,7 +1438,7 @@ minitest.prep:
 # is crashing.
 minitest: miniperl$(EXE_EXT) lib/re.pm minitest.prep
        - cd t && (rm -f perl$(EXE_EXT); $(LNS) ../miniperl$(EXE_EXT) perl$(EXE_EXT)) \
-               && $(LDLIBPTH) $(RUN) ./perl TEST -minitest base/*.t comp/*.t cmd/*.t run/*.t io/*.t op/*.t uni/*.t </dev/tty
+               && $(LDLIBPTH) $(RUN) ./perl TEST -minitest base/*.t comp/*.t cmd/*.t run/*.t io/*.t re/*.t op/*.t uni/*.t </dev/tty
 
 # Test via harness
 
@@ -1449,7 +1449,7 @@ test_harness_notty: test_prep
        PERL=./perl HARNESS_NOTTY=1 $(MAKE) TESTFILE=harness _test
 
 test-reonly: test_prep
-       PERL=./perl TEST_ARGS='-re \\bpat\\b \\breg \\bre\b \\bsubst \\brxcode' $(MAKE) TESTFILE=harness _test
+       PERL=./perl TEST_ARGS='-re \\bre\\/' $(MAKE) TESTFILE=harness _test
 
 # Handy way to run perlbug -ok without having to install and run the
 # installed perlbug. We don't re-run the tests here - we trust the user.
index 2e5c308..be860ee 100644 (file)
@@ -1802,6 +1802,11 @@ other directories.
 Tests for POD directives.  There are still some tests for the Pod
 modules hanging around in here that need to be moved out into F<lib/>.
 
+=item F<t/re/>
+
+Tests for regex related functions or behaviour. (These used to live
+in t/op).
+
 =item F<t/run/>
 
 Testing features of how perl actually runs, including exit codes and
diff --git a/t/TEST b/t/TEST
index 42f1d20..2aefc3e 100755 (executable)
--- a/t/TEST
+++ b/t/TEST
@@ -356,7 +356,7 @@ unless (@ARGV) {
     # then comp, to validate that require works
     # then run, to validate that -M works
     # then we know we can -MTestInit for everything else, making life simpler
-    foreach my $dir (qw(base comp run cmd io op uni mro)) {
+    foreach my $dir (qw(base comp run cmd io re op uni mro)) {
        _find_tests($dir);
     }
     _find_tests("lib") unless $::core;
index 51de53a..a70c8be 100644 (file)
--- a/t/harness
+++ b/t/harness
@@ -127,7 +127,7 @@ if (@ARGV) {
     unless (@tests) {
        my @seq = <base/*.t>;
 
-       my @next = qw(comp run cmd io op uni mro lib porting);
+       my @next = qw(comp run cmd io re op uni mro lib porting);
        push @next, 'japh' if $torture;
        push @next, 'win32' if $^O eq 'MSWin32';
        push @next, 'benchmark' if $ENV{PERL_BENCHMARK};
diff --git a/t/op/regexp_noamp.t b/t/op/regexp_noamp.t
deleted file mode 100644 (file)
index 9aa00b5..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-#!./perl
-
-$skip_amp = 1;
-for $file ('./op/regexp.t', './t/op/regexp.t', ':op:regexp.t') {
-  if (-r $file) {
-    do $file or die $@;
-    exit;
-  }
-}
-die "Cannot find ./op/regexp.t or ./t/op/regexp.t\n";
diff --git a/t/op/regexp_qr.t b/t/op/regexp_qr.t
deleted file mode 100644 (file)
index 81ba14c..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-#!./perl
-
-$qr = 1;
-for $file ('./op/regexp.t', './t/op/regexp.t', ':op:regexp.t') {
-    if (-r $file) {
-       do $file or die $@;
-       exit;
-    }
-}
-die "Cannot find ./op/regexp.t or ./t/op/regexp.t\n";
diff --git a/t/op/regexp_qr_embed.t b/t/op/regexp_qr_embed.t
deleted file mode 100644 (file)
index d5f0844..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-#!./perl
-
-$qr = 1;
-$qr_embed = 1;
-for $file ('./op/regexp.t', './t/op/regexp.t', ':op:regexp.t') {
-    if (-r $file) {
-       do $file or die $@;
-       exit;
-    }
-}
-die "Cannot find ./op/regexp.t or ./t/op/regexp.t\n";
diff --git a/t/op/regexp_qr_embed_thr.t b/t/op/regexp_qr_embed_thr.t
deleted file mode 100644 (file)
index 4f91bd4..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-#!./perl
-
-$qr = 1;
-$qr_embed_thr = 1;
-for $file ('./op/regexp.t', './t/op/regexp.t', ':op:regexp.t') {
-    if (-r $file) {
-       do $file or die $@;
-       exit;
-    }
-}
-die "Cannot find ./op/regexp.t or ./t/op/regexp.t\n";
diff --git a/t/op/substT.t b/t/op/substT.t
deleted file mode 100644 (file)
index 5d02692..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-#!perl -wT
-
-for $file ('op/subst.t', 't/op/subst.t', ':op:subst.t') {
-  if (-r $file) {
-    do "./$file";
-    exit;
-  }
-}
-die "Cannot find op/subst.t or t/op/subst.t\n";
diff --git a/t/op/subst_wamp.t b/t/op/subst_wamp.t
deleted file mode 100644 (file)
index 1207343..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-#!./perl
-
-$dummy = defined $&;           # Now we have it...
-for $file ('op/subst.t', 't/op/subst.t', ':op:subst.t') {
-  if (-r $file) {
-    do "./$file";
-    exit;
-  }
-}
-die "Cannot find op/subst.t or t/op/subst.t\n";
-
similarity index 100%
rename from t/op/pat.t
rename to t/re/pat.t
similarity index 100%
rename from t/op/pat_thr.t
rename to t/re/pat_thr.t
similarity index 100%
rename from t/op/qr.t
rename to t/re/qr.t
similarity index 100%
rename from t/op/qr_gc.t
rename to t/re/qr_gc.t
similarity index 100%
rename from t/op/qrstack.t
rename to t/re/qrstack.t
similarity index 100%
rename from t/op/re.t
rename to t/re/re.t
similarity index 100%
rename from t/op/re_tests
rename to t/re/re_tests
similarity index 100%
rename from t/op/reg_60508.t
rename to t/re/reg_60508.t
similarity index 100%
rename from t/op/reg_email.t
rename to t/re/reg_email.t
similarity index 100%
rename from t/op/reg_email_thr.t
rename to t/re/reg_email_thr.t
similarity index 100%
rename from t/op/reg_fold.t
rename to t/re/reg_fold.t
similarity index 100%
rename from t/op/reg_mesg.t
rename to t/re/reg_mesg.t
similarity index 100%
rename from t/op/reg_nc_tie.t
rename to t/re/reg_nc_tie.t
similarity index 100%
rename from t/op/reg_pmod.t
rename to t/re/reg_pmod.t
similarity index 100%
rename from t/op/reg_posixcc.t
rename to t/re/reg_posixcc.t
similarity index 100%
rename from t/op/reg_unsafe.t
rename to t/re/reg_unsafe.t
similarity index 98%
rename from t/op/regexp.t
rename to t/re/regexp.t
index ba5da62..e970ba9 100644 (file)
@@ -73,8 +73,8 @@ use vars qw($qr $skip_amp $qr_embed $qr_embed_thr); # set by our callers
 
 
 if (!defined $file) {
-    open(TESTS,'op/re_tests') || open(TESTS,'t/op/re_tests')
-       || open(TESTS,':op:re_tests') || die "Can't open re_tests";
+    open(TESTS,'re/re_tests') || open(TESTS,'t/re/re_tests')
+       || open(TESTS,':re:re_tests') || die "Can't open re_tests";
 }
 
 my @tests = <TESTS>;
diff --git a/t/re/regexp_noamp.t b/t/re/regexp_noamp.t
new file mode 100644 (file)
index 0000000..6b2952d
--- /dev/null
@@ -0,0 +1,10 @@
+#!./perl
+
+$skip_amp = 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";
similarity index 57%
rename from t/op/regexp_notrie.t
rename to t/re/regexp_notrie.t
index beada13..9ace6ed 100644 (file)
@@ -6,10 +6,10 @@ BEGIN {
 }
 
 $qr = 1;
-for $file ('./op/regexp.t', './t/op/regexp.t', ':op:regexp.t') {
+for $file ('./re/regexp.t', './t/re/regexp.t', ':re:regexp.t') {
     if (-r $file) {
        do $file or die $@;
        exit;
     }
 }
-die "Cannot find ./op/regexp.t or ./t/op/regexp.t\n";
+die "Cannot find ./re/regexp.t or ./t/re/regexp.t\n";
diff --git a/t/re/regexp_qr.t b/t/re/regexp_qr.t
new file mode 100644 (file)
index 0000000..18b1cf8
--- /dev/null
@@ -0,0 +1,10 @@
+#!./perl
+
+$qr = 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";
diff --git a/t/re/regexp_qr_embed.t b/t/re/regexp_qr_embed.t
new file mode 100644 (file)
index 0000000..f0366ca
--- /dev/null
@@ -0,0 +1,11 @@
+#!./perl
+
+$qr = 1;
+$qr_embed = 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";
diff --git a/t/re/regexp_qr_embed_thr.t b/t/re/regexp_qr_embed_thr.t
new file mode 100644 (file)
index 0000000..db89c1a
--- /dev/null
@@ -0,0 +1,11 @@
+#!./perl
+
+$qr = 1;
+$qr_embed_thr = 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";
similarity index 59%
rename from t/op/regexp_trielist.t
rename to t/re/regexp_trielist.t
index 214e80b..55379e8 100644 (file)
@@ -6,10 +6,10 @@ BEGIN {
       }
 
 $qr = 1;
-for $file ('./op/regexp.t', './t/op/regexp.t', ':op:regexp.t') {
+for $file ('./re/regexp.t', './t/re/regexp.t', ':re:regexp.t') {
     if (-r $file) {
        do $file or die $@;
        exit;
     }
 }
-die "Cannot find ./op/regexp.t or ./t/op/regexp.t\n";
+die "Cannot find ./re/regexp.t or ./t/re/regexp.t\n";
similarity index 100%
rename from t/op/rxcode.t
rename to t/re/rxcode.t
similarity index 100%
rename from t/op/subst.t
rename to t/re/subst.t
diff --git a/t/re/substT.t b/t/re/substT.t
new file mode 100644 (file)
index 0000000..22c3c50
--- /dev/null
@@ -0,0 +1,9 @@
+#!perl -wT
+
+for $file ('re/subst.t', 't/re/subst.t', ':re:subst.t') {
+  if (-r $file) {
+    do "./$file";
+    exit;
+  }
+}
+die "Cannot find re/subst.t or t/re/subst.t\n";
similarity index 100%
rename from t/op/subst_amp.t
rename to t/re/subst_amp.t
diff --git a/t/re/subst_wamp.t b/t/re/subst_wamp.t
new file mode 100644 (file)
index 0000000..286141c
--- /dev/null
@@ -0,0 +1,11 @@
+#!./perl
+
+$dummy = defined $&;           # Now we have it...
+for $file ('re/subst.t', 't/re/subst.t', ':re:subst.t') {
+  if (-r $file) {
+    do "./$file";
+    exit;
+  }
+}
+die "Cannot find re/subst.t or t/re/subst.t\n";
+
similarity index 100%
rename from t/op/substr.t
rename to t/re/substr.t
similarity index 100%
rename from t/op/substr_thr.t
rename to t/re/substr_thr.t
index 057089d..332b8ca 100644 (file)
@@ -1289,7 +1289,7 @@ test-reonly : reonly utils
        $(XCOPY) $(PERLDLL) ..\t\$(NULL)
        $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
        cd ..\t
-       $(PERLEXE) -I..\lib harness $(OPT) -re \bpat\b \breg \bre\b \bsubst \brxcode $(EXTRA)
+       $(PERLEXE) -I..\lib harness $(OPT) -re \bre\\/ $(EXTRA)
        cd ..\win32
 
 regen :
index 1d1c51a..002d5c5 100644 (file)
@@ -1620,7 +1620,7 @@ test-reonly : reonly utils
        $(XCOPY) $(PERLDLL) ..\t\$(NULL)
        $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
        cd ..\t && \
-       $(PERLEXE) -I..\lib harness $(OPT) -re \bpat\b \breg \bre\b \bsubst \brxcode $(EXTRA) && \
+       $(PERLEXE) -I..\lib harness $(OPT) -re \bpat\\/ $(EXTRA) && \
        cd ..\win32
 
 regen :