summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rwxr-xr-xtools/opttest.pl31
1 files changed, 25 insertions, 6 deletions
diff --git a/tools/opttest.pl b/tools/opttest.pl
index 96c4fb0a..56a5c88f 100755
--- a/tools/opttest.pl
+++ b/tools/opttest.pl
@@ -28,22 +28,41 @@ for my $prog (keys %progs) {
28 28
29 $idx = 1; 29 $idx = 1;
30 $output = `$prog -h 2>&1`; 30 $output = `$prog -h 2>&1`;
31 if($?) {$state++;print "$prog failed test $idx\n";} 31 if(($? >> 8) != 3) {
32 $state++;
33 print "$prog failed test $idx (help exit code (short form))\n";
34 exit(1);
35 }
36
32 unless ($output =~ m/$progs{$prog}/ms) { 37 unless ($output =~ m/$progs{$prog}/ms) {
33 $idx++; $state++;print "$output\n$prog failed test $idx\n"; 38 $idx++;
39 $state++;
40 print "$output\n$prog failed test $idx\n";
34 } 41 }
35 42
36 $idx++; 43 $idx++;
37 `$prog --help 2>&1 > /dev/null`; 44 `$prog --help 2>&1 > /dev/null`;
38 if($?) {$state++;print "$prog failed test $idx\n";} 45 if(($? >> 8) != 3) {
46 $state++;
47 print "$prog failed test $idx (help exit code (long form))\n";
48 exit(1);
49 }
39 50
40 $idx++; 51 $idx++;
41 `$prog -V 2>&1 > /dev/null`; 52 `$prog -V 2>&1 > /dev/null`;
42 if($?) {$state++;print "$prog failed test $idx\n";} 53 if(($? >> 8) != 3) {
54 $state++;
55 print "$prog failed test $idx (version exit code (short form))\n";
56 exit(1);
57 }
43 58
44 $idx++; 59 $idx++;
45 `$prog --version 2>&1 > /dev/null`; 60 `$prog --version 2>&1 > /dev/null`;
46 if($?) {$state++;print "$prog failed test $idx\n";} 61 if(($? >> 8) != 3) {
62 $state++;
63 print "$prog failed test $idx (version exit code (long form))\n";
64 exit(1);
65 }
47 66
48 print "$prog ($idx tests) "; 67 print "$prog ($idx tests) ";
49 ok $state,0; 68 ok $state,0;