7 use Term::ANSIColor ':constants';
8 $Term::ANSIColor::AUTORESET = 1;
10 die "Please specify the top source directory.\n" if (!@ARGV);
11 my $top_srcdir = shift @ARGV;
15 'Test-auth-no-challenge.px',
16 'Test-auth-no-challenge-url.px',
17 'Test-proxy-auth-basic.px',
18 'Test-proxied-https-auth.px',
19 'Test-N-HTTP-Content-Disposition.px',
29 'Test-ftp-iri-fallback.px',
30 'Test-ftp-iri-disabled.px',
31 'Test-HTTP-Content-Disposition-1.px',
32 'Test-HTTP-Content-Disposition-2.px',
33 'Test-HTTP-Content-Disposition.px',
34 'Test-idn-headers.px',
38 'Test-iri-disabled.px',
39 'Test-iri-forced-remote.px',
44 'Test-N--no-content-disposition.px',
45 'Test-N--no-content-disposition-trivial.px',
46 'Test--no-content-disposition.px',
47 'Test--no-content-disposition-trivial.px',
49 'Test-nonexisting-quiet.px',
53 'Test-O-HTTP-Content-Disposition.px',
54 'Test-O--no-content-disposition.px',
55 'Test-O--no-content-disposition-trivial.px',
56 'Test-O-nonexisting.px',
59 'Test-Restrict-Lowercase.px',
60 'Test-Restrict-Uppercase.px',
61 'Test--spider-fail.px',
62 'Test--spider-r-HTTP-Content-Disposition.px',
63 'Test--spider-r--no-content-disposition.px',
64 'Test--spider-r--no-content-disposition-trivial.px',
70 foreach my $test (@tests) {
71 print "Running $test\n\n";
72 system("$^X $top_srcdir/tests/$test");
73 push @tested, { name => $test, result => $? };
77 foreach my $test (@tested) {
78 ($test->{result} == 0)
79 ? print GREEN 'pass: '
81 print $test->{name}, "\n";
87 pass => sub { scalar grep $_->{result} == 0, @tested },
88 fail => sub { scalar grep $_->{result} != 0, @tested },
95 "${\scalar @tested} tests were run",
96 "${\$count->('pass')} PASS, ${\$count->('fail')} FAIL",
101 foreach my $line (@lines) {
102 if (length $line > $_) {
115 print $count->('fail')
120 exit $count->('fail');