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-proxy-auth-basic.px',
16 'Test-proxied-https-auth.px',
17 'Test-N-HTTP-Content-Disposition.px',
26 'Test-HTTP-Content-Disposition-1.px',
27 'Test-HTTP-Content-Disposition-2.px',
28 'Test-HTTP-Content-Disposition.px',
32 'Test-N--no-content-disposition.px',
33 'Test-N--no-content-disposition-trivial.px',
34 'Test--no-content-disposition.px',
35 'Test--no-content-disposition-trivial.px',
37 'Test-nonexisting-quiet.px',
41 'Test-O-HTTP-Content-Disposition.px',
42 'Test-O--no-content-disposition.px',
43 'Test-O--no-content-disposition-trivial.px',
44 'Test-O-nonexisting.px',
47 'Test-Restrict-Lowercase.px',
48 'Test-Restrict-Uppercase.px',
49 'Test--spider-fail.px',
50 'Test--spider-r-HTTP-Content-Disposition.px',
51 'Test--spider-r--no-content-disposition.px',
52 'Test--spider-r--no-content-disposition-trivial.px',
58 foreach my $test (@tests) {
59 print "Running $test\n\n";
60 system("$^X $top_srcdir/tests/$test");
61 push @tested, { name => $test, result => $? };
65 foreach my $test (@tested) {
66 ($test->{result} == 0)
67 ? print GREEN 'pass: '
69 print $test->{name}, "\n";
75 pass => sub { scalar grep $_->{result} == 0, @tested },
76 fail => sub { scalar grep $_->{result} != 0, @tested },
83 "${\scalar @tested} tests were run",
84 "${\$count->('pass')} PASS, ${\$count->('fail')} FAIL",
89 foreach my $line (@lines) {
90 if (length $line > $_) {
103 print $count->('fail')
108 exit $count->('fail');