blob: 0c01ebee0b7e8de8c777ea9cb494480f6b41507c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#!/usr/bin/perl
use strict;
use warnings;
my @tests;
for (glob "test*[0-9].exe") {
push @tests, "$_" if -e substr($_, 0, - 4).".ans";
}
my $num_failed=0;
for my $test (@tests) {
`./$test > $test.out`;
my $ansfile = substr($test, 0, - 4).".ans";
`diff $test.out $ansfile`;
print "$test failed\n" if $?;
$num_failed++ if $?;
}
print scalar @tests . " tests conducted, $num_failed failed.\n";
exit $num_failed;
|