1
0
mirror of https://github.com/moparisthebest/wget synced 2024-07-03 16:38:41 -04:00
wget/tests/run-px
2008-09-09 21:55:02 -07:00

83 lines
2.1 KiB
Perl
Executable File

#!/usr/bin/env perl
use warnings;
die "Please specify the top source directory.\n" if (!@ARGV);
my $top_srcdir = shift @ARGV;
my @tests = (
'Test-auth-basic.px',
'Test-proxy-auth-basic.px',
'Test-proxied-https-auth.px',
'Test-N-HTTP-Content-Disposition.px',
'Test--spider.px',
'Test-c-full.px',
'Test-c-partial.px',
'Test-c-shorter.px',
'Test-c.px',
'Test-E-k-K.px',
'Test-E-k.px',
'Test-ftp.px',
'Test-ftp-iri.px',
'Test-ftp-iri-fallback.px',
'Test-ftp-iri-disabled.px',
'Test-HTTP-Content-Disposition-1.px',
'Test-HTTP-Content-Disposition-2.px',
'Test-HTTP-Content-Disposition.px',
'Test-idn-headers.px',
'Test-idn-meta.px',
'Test-idn-cmd.px',
'Test-iri.px',
'Test-iri-disabled.px',
'Test-iri-forced-remote.px',
'Test-iri-list.px',
'Test-N-current.px',
'Test-N-smaller.px',
'Test-N-no-info.px',
'Test-N--no-content-disposition.px',
'Test-N--no-content-disposition-trivial.px',
'Test--no-content-disposition.px',
'Test--no-content-disposition-trivial.px',
'Test-N-old.px',
'Test-nonexisting-quiet.px',
'Test-noop.px',
'Test-np.px',
'Test-N.px',
'Test-O-HTTP-Content-Disposition.px',
'Test-O--no-content-disposition.px',
'Test-O--no-content-disposition-trivial.px',
'Test-O-nonexisting.px',
'Test-O.px',
'Test-O-nc.px',
'Test-Restrict-Lowercase.px',
'Test-Restrict-Uppercase.px',
'Test--spider-fail.px',
'Test--spider-r-HTTP-Content-Disposition.px',
'Test--spider-r--no-content-disposition.px',
'Test--spider-r--no-content-disposition-trivial.px',
'Test--spider-r.px',
);
my @results;
for my $test (@tests) {
print "Running $test\n\n";
system("$top_srcdir/tests/$test");
push @results, $?;
}
for (my $i=0; $i != @tests; ++$i) {
if ($results[$i] == 0) {
print "pass: ";
} else {
print "FAIL: ";
}
print "$tests[$i]\n";
}
print "\n";
print scalar(@results) . " tests were run\n";
print scalar(grep $_ == 0, @results) . " PASS\n";
print scalar(grep $_ != 0, @results) . " FAIL\n";
exit scalar (grep $_ != 0, @results);