From: Yves Orton Date: Sat, 19 Feb 2005 11:10:00 +0000 (+0100) Subject: (patch blead) Extend t/harness to allow filtering of the file list by regex. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=8a76aa1f201f195cea47d9c3db2cada8aeafe866;p=p5sagit%2Fp5-mst-13.2.git (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 --- diff --git a/t/harness b/t/harness index 4fc7746..e3e02f5 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";