diff options
author | Yves Orton <demerphq@gmail.com> | 2005-02-19 12:10:00 +0100 |
---|---|---|
committer | Steve Hay <SteveHay@planit.com> | 2005-02-23 13:36:59 +0000 |
commit | 8a76aa1f201f195cea47d9c3db2cada8aeafe866 (patch) | |
tree | b3bf4dcfc8cf53dffa43ece6bdbaa2383dffd803 /t/harness | |
parent | 89087c85554906f75168ff676e546ecaa383a9c4 (diff) | |
download | perl-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/harness | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -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"; |