summaryrefslogtreecommitdiff
path: root/t/harness
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2009-08-09 09:16:44 +0100
committerNicholas Clark <nick@ccl4.org>2009-08-09 09:16:44 +0100
commitfc279e463ddb1765ee76b9e5d84a0c7545544bbe (patch)
treef520f3489983cc85d74b02c434a56209b843f7c8 /t/harness
parentbb85b28a6da36a76a3909c40a8a5f0a80a04163c (diff)
downloadperl-fc279e463ddb1765ee76b9e5d84a0c7545544bbe.tar.gz
Inline _seq_dir_rules(), as it is now used in only one place.
Diffstat (limited to 't/harness')
-rw-r--r--t/harness25
1 files changed, 11 insertions, 14 deletions
diff --git a/t/harness b/t/harness
index 34411129bc..c2fbbeed9a 100644
--- a/t/harness
+++ b/t/harness
@@ -55,19 +55,6 @@ sub _populate_hash {
return map {$_, 1} split /\s+/, $_[0];
}
-# Generate T::H schedule rules that run the contents of each directory
-# sequentially.
-sub _seq_dir_rules {
- my @tests = @_;
- my %dir;
- for (@tests) {
- s{[^/]+$}{\*};
- $dir{$_}++;
- }
-
- return { par => [ map { { seq => $_ } } sort keys %dir ] };
-}
-
sub _extract_tests;
sub _extract_tests {
# This can probably be done more tersely with a map, but I doubt that it
@@ -215,7 +202,17 @@ if (@ARGV) {
push @tests, @last;
- push @seq, _seq_dir_rules @last;
+ # Generate T::H schedule rules that run the contents of each directory
+ # sequentially.
+ {
+ my %dir;
+ for (@last) {
+ s{[^/]+$}{\*};
+ $dir{$_}++;
+ }
+
+ push @seq, { par => [ map { { seq => $_ } } sort keys %dir ] };
+ }
$rules = { seq => \@seq };
}