now sorts the test cases when "all" is used

This commit is contained in:
Daniel Stenberg
2000-11-15 08:21:14 +00:00
parent eb72e001a7
commit e0e67812de

View File

@@ -398,10 +398,14 @@ if ( $TESTCASES eq "all") {
my @cmds = grep { /^command/ && -f "$TESTDIR/$_" } readdir(DIR); my @cmds = grep { /^command/ && -f "$TESTDIR/$_" } readdir(DIR);
closedir DIR; closedir DIR;
$TESTCASES=""; $TESTCASES=""; # start with no test cases
# cut off everything but the digits
for(@cmds) { for(@cmds) {
# cut off everything but the digits
$_ =~ s/[a-z\/\.]*//g; $_ =~ s/[a-z\/\.]*//g;
}
# the the numbers from low to high
for(sort { $a <=> $b } @cmds) {
$TESTCASES .= " $_"; $TESTCASES .= " $_";
} }
} }