From: Yves Orton Date: Thu, 10 Sep 2009 18:39:13 +0000 (+0200) Subject: move regex related tests out of t/op/ into t/re/ X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a4499558ecf2e75d73756479898bf8c8dbe8a6f6;p=p5sagit%2Fp5-mst-13.2.git move regex related tests out of t/op/ into t/re/ --- diff --git a/MANIFEST b/MANIFEST index e555b62..6bf3312 100644 --- 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 diff --git a/Makefile.SH b/Makefile.SH index 1ab2d22..76c5aba 100644 --- a/Makefile.SH +++ b/Makefile.SH @@ -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 . +=item F + +Tests for regex related functions or behaviour. (These used to live +in t/op). + =item F Testing features of how perl actually runs, including exit codes and diff --git a/t/TEST b/t/TEST index 42f1d20..2aefc3e 100755 --- 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; diff --git a/t/harness b/t/harness index 51de53a..a70c8be 100644 --- a/t/harness +++ b/t/harness @@ -127,7 +127,7 @@ if (@ARGV) { unless (@tests) { my @seq = ; - 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 index 9aa00b5..0000000 --- a/t/op/regexp_noamp.t +++ /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 index 81ba14c..0000000 --- a/t/op/regexp_qr.t +++ /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 index d5f0844..0000000 --- a/t/op/regexp_qr_embed.t +++ /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 index 4f91bd4..0000000 --- a/t/op/regexp_qr_embed_thr.t +++ /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 index 5d02692..0000000 --- a/t/op/substT.t +++ /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 index 1207343..0000000 --- a/t/op/subst_wamp.t +++ /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"; - diff --git a/t/op/pat.t b/t/re/pat.t similarity index 100% rename from t/op/pat.t rename to t/re/pat.t diff --git a/t/op/pat_thr.t b/t/re/pat_thr.t similarity index 100% rename from t/op/pat_thr.t rename to t/re/pat_thr.t diff --git a/t/op/qr.t b/t/re/qr.t similarity index 100% rename from t/op/qr.t rename to t/re/qr.t diff --git a/t/op/qr_gc.t b/t/re/qr_gc.t similarity index 100% rename from t/op/qr_gc.t rename to t/re/qr_gc.t diff --git a/t/op/qrstack.t b/t/re/qrstack.t similarity index 100% rename from t/op/qrstack.t rename to t/re/qrstack.t diff --git a/t/op/re.t b/t/re/re.t similarity index 100% rename from t/op/re.t rename to t/re/re.t diff --git a/t/op/re_tests b/t/re/re_tests similarity index 100% rename from t/op/re_tests rename to t/re/re_tests diff --git a/t/op/reg_60508.t b/t/re/reg_60508.t similarity index 100% rename from t/op/reg_60508.t rename to t/re/reg_60508.t diff --git a/t/op/reg_email.t b/t/re/reg_email.t similarity index 100% rename from t/op/reg_email.t rename to t/re/reg_email.t diff --git a/t/op/reg_email_thr.t b/t/re/reg_email_thr.t similarity index 100% rename from t/op/reg_email_thr.t rename to t/re/reg_email_thr.t diff --git a/t/op/reg_fold.t b/t/re/reg_fold.t similarity index 100% rename from t/op/reg_fold.t rename to t/re/reg_fold.t diff --git a/t/op/reg_mesg.t b/t/re/reg_mesg.t similarity index 100% rename from t/op/reg_mesg.t rename to t/re/reg_mesg.t diff --git a/t/op/reg_namedcapture.t b/t/re/reg_namedcapture.t similarity index 100% rename from t/op/reg_namedcapture.t rename to t/re/reg_namedcapture.t diff --git a/t/op/reg_nc_tie.t b/t/re/reg_nc_tie.t similarity index 100% rename from t/op/reg_nc_tie.t rename to t/re/reg_nc_tie.t diff --git a/t/op/reg_pmod.t b/t/re/reg_pmod.t similarity index 100% rename from t/op/reg_pmod.t rename to t/re/reg_pmod.t diff --git a/t/op/reg_posixcc.t b/t/re/reg_posixcc.t similarity index 100% rename from t/op/reg_posixcc.t rename to t/re/reg_posixcc.t diff --git a/t/op/reg_unsafe.t b/t/re/reg_unsafe.t similarity index 100% rename from t/op/reg_unsafe.t rename to t/re/reg_unsafe.t diff --git a/t/op/regexp.t b/t/re/regexp.t similarity index 98% rename from t/op/regexp.t rename to t/re/regexp.t index ba5da62..e970ba9 100644 --- a/t/op/regexp.t +++ b/t/re/regexp.t @@ -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 = ; diff --git a/t/re/regexp_noamp.t b/t/re/regexp_noamp.t new file mode 100644 index 0000000..6b2952d --- /dev/null +++ b/t/re/regexp_noamp.t @@ -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"; diff --git a/t/op/regexp_notrie.t b/t/re/regexp_notrie.t similarity index 57% rename from t/op/regexp_notrie.t rename to t/re/regexp_notrie.t index beada13..9ace6ed 100644 --- a/t/op/regexp_notrie.t +++ b/t/re/regexp_notrie.t @@ -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 index 0000000..18b1cf8 --- /dev/null +++ b/t/re/regexp_qr.t @@ -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 index 0000000..f0366ca --- /dev/null +++ b/t/re/regexp_qr_embed.t @@ -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 index 0000000..db89c1a --- /dev/null +++ b/t/re/regexp_qr_embed_thr.t @@ -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"; diff --git a/t/op/regexp_trielist.t b/t/re/regexp_trielist.t similarity index 59% rename from t/op/regexp_trielist.t rename to t/re/regexp_trielist.t index 214e80b..55379e8 100644 --- a/t/op/regexp_trielist.t +++ b/t/re/regexp_trielist.t @@ -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/op/regexp_unicode_prop.t b/t/re/regexp_unicode_prop.t similarity index 100% rename from t/op/regexp_unicode_prop.t rename to t/re/regexp_unicode_prop.t diff --git a/t/op/regexp_unicode_prop_thr.t b/t/re/regexp_unicode_prop_thr.t similarity index 100% rename from t/op/regexp_unicode_prop_thr.t rename to t/re/regexp_unicode_prop_thr.t diff --git a/t/op/rxcode.t b/t/re/rxcode.t similarity index 100% rename from t/op/rxcode.t rename to t/re/rxcode.t diff --git a/t/op/subst.t b/t/re/subst.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 index 0000000..22c3c50 --- /dev/null +++ b/t/re/substT.t @@ -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"; diff --git a/t/op/subst_amp.t b/t/re/subst_amp.t 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 index 0000000..286141c --- /dev/null +++ b/t/re/subst_wamp.t @@ -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"; + diff --git a/t/op/substr.t b/t/re/substr.t similarity index 100% rename from t/op/substr.t rename to t/re/substr.t diff --git a/t/op/substr_thr.t b/t/re/substr_thr.t similarity index 100% rename from t/op/substr_thr.t rename to t/re/substr_thr.t diff --git a/win32/Makefile b/win32/Makefile index 057089d..332b8ca 100644 --- a/win32/Makefile +++ b/win32/Makefile @@ -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 : diff --git a/win32/makefile.mk b/win32/makefile.mk index 1d1c51a..002d5c5 100644 --- a/win32/makefile.mk +++ b/win32/makefile.mk @@ -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 :