#use strict;
use v5.10.1;
use warnings;
-use if $^V >= v5.19.11, experimental => 'smartmatch';
use Errno;
use FileHandle;
# mailq times change with when the run is done, vs. static-source spoolfiles
s/\s*\d*[hd](?= 317 [0-9A-Za-z\-]{23} <nobody\@test.ex>)/DDd/;
+
+ # Not all builds include EXPERIMENTAL_DSN_INFO (1 of 2)
+ if (/^X-Exim-Diagnostic:/)
+ {
+ while (<IN>) {
+ last if (/^$/ || !/^\s/);
+ }
+ goto RESET_AFTER_EXTRA_LINE_READ;
+ }
}
# ======== stderr ========
<IN>;
<IN>;
}
+
+ # Not all builds include EXPERIMENTAL_DSN_INFO (2 of 2)
+ if (/^X-Exim-Diagnostic:/)
+ {
+ while (<IN>) {
+ last if (/^$/ || !/^\s/);
+ }
+ goto RESET_AFTER_EXTRA_LINE_READ;
+ }
}
# ======== All files other than stderr ========
run_system("$_ >>test-stdout 2>>test-stderr");
return 1;
}
+if (/^cat2\s/)
+ {
+ s/^cat2/cat/;
+ run_system("$_ 2>&1 >test-stderr");
+ return 1;
+ }
print "Exim binary is `$parm_exim'\n" if defined $parm_exim;
+my %wanted;
my @wanted = sort numerically uniq
@tests_wanted ? @tests_wanted : (),
@range_wanted ? $range_wanted[0] .. $range_wanted[1] : (),
0+$ARGV[0]..0+$ARGV[1] # add 0 to cope with test numbers starting with zero
: ();
@wanted = 1..TEST_TOP if not @wanted;
+map { $wanted{sprintf("%04d",$_)}= $_; } @wanted;
##################################################
# Check for sudo access to root #
# We want the tests from this subdirectory, provided they are in the
# range that was selected.
- @testlist = grep { $_ ~~ @wanted } grep { /^\d+(?:\.\d+)?$/ } map { basename $_ } glob "scripts/$testdir/*";
+ undef @testlist;
+ map { push @testlist, $_ if exists $wanted{$_} } grep { /^\d+(?:\.\d+)?$/ } map { basename $_ } glob "scripts/$testdir/*";
tests_exit(-1, "Failed to read test scripts from `scripts/$testdir/*': $!")
if not @testlist;