summaryrefslogtreecommitdiff
path: root/t/harness
diff options
context:
space:
mode:
authorYves Orton <demerphq@gmail.com>2005-02-19 12:10:00 +0100
committerSteve Hay <SteveHay@planit.com>2005-02-23 13:36:59 +0000
commit8a76aa1f201f195cea47d9c3db2cada8aeafe866 (patch)
treeb3bf4dcfc8cf53dffa43ece6bdbaa2383dffd803 /t/harness
parent89087c85554906f75168ff676e546ecaa383a9c4 (diff)
downloadperl-8a76aa1f201f195cea47d9c3db2cada8aeafe866.tar.gz
(patch blead) Extend t/harness to allow filtering of the file list by regex.
Message-ID: <9b18b3110502190210105decf4@mail.gmail.com> p4raw-id: //depot/perl@23993
Diffstat (limited to 't/harness')
-rw-r--r--t/harness12
1 files changed, 12 insertions, 0 deletions
diff --git a/t/harness b/t/harness
index 4fc77460e7..e3e02f5ced 100644
--- a/t/harness
+++ b/t/harness
@@ -54,6 +54,16 @@ sub _populate_hash {
return map {$_, 1} split /\s+/, $_[0];
}
+if ($ARGV[0]=~/^-re/) {
+ if ($ARGV[0]!~/=/) {
+ shift;
+ $re=join "|",@ARGV;
+ @ARGV=();
+ } else {
+ (undef,$re)=split/=/,shift;
+ }
+}
+
if (@ARGV) {
if ($^O eq 'MSWin32') {
@tests = map(glob($_),@ARGV);
@@ -108,6 +118,8 @@ if (@ARGV) {
if ($^O eq 'MSWin32') {
s,\\,/,g for @tests;
}
+@tests=grep /$re/, @tests
+ if $re;
Test::Harness::runtests @tests;
exit(0) unless -e "../testcompile";