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',
28 'Test-HTTP-Content-Disposition-1.px',
29 'Test-HTTP-Content-Disposition-2.px',
30 'Test-HTTP-Content-Disposition.px',
34 'Test-N--no-content-disposition.px',
35 'Test-N--no-content-disposition-trivial.px',
36 'Test--no-content-disposition.px',
37 'Test--no-content-disposition-trivial.px',
39 'Test-nonexisting-quiet.px',
43 'Test-O-HTTP-Content-Disposition.px',
44 'Test-O--no-content-disposition.px',
45 'Test-O--no-content-disposition-trivial.px',
46 'Test-O-nonexisting.px',
49 'Test-Restrict-Lowercase.px',
50 'Test-Restrict-Uppercase.px',
51 'Test--spider-fail.px',
52 'Test--spider-r-HTTP-Content-Disposition.px',
53 'Test--spider-r--no-content-disposition.px',
54 'Test--spider-r--no-content-disposition-trivial.px',
60 foreach my $test (@tests) {
61 print "Running $test\n\n";
62 system("$^X -I$top_srcdir/tests $top_srcdir/tests/$test");
63 push @tested, { name => $test, result => $? };
67 foreach my $test (@tested) {
68 ($test->{result} == 0)
69 ? print GREEN 'pass: '
71 print $test->{name}, "\n";
77 pass => sub { scalar grep $_->{result} == 0, @tested },
78 fail => sub { scalar grep $_->{result} != 0, @tested },
85 "${\scalar @tested} tests were run",
86 "${\$count->('pass')} PASS, ${\$count->('fail')} FAIL",
91 foreach my $line (@lines) {
92 if (length $line > $_) {
105 print $count->('fail')
110 exit $count->('fail');