|
27 | 27 |
|
28 | 28 | # read lines from regress.in and run uri-regress on them
|
29 | 29 | while (<REGRESS_IN>)
|
30 |
| -{ |
31 |
| -chomp; |
32 |
| -print"trying$_\n"; |
33 |
| -system("./uri-regress\"$_\""); |
34 |
| -print"\n"; |
| 30 | +{ |
| 31 | +chomp; |
| 32 | +print"trying$_\n"; |
| 33 | +system("./uri-regress\"$_\""); |
| 34 | +print"\n"; |
35 | 35 | }
|
36 | 36 |
|
37 | 37 | # restore STDOUT/ERR so we can print the outcome to the user
|
38 | 38 | open(STDERR,">&", \*OLDERR)ordie;# can't complain as STDERR is still duped
|
39 |
| -open(STDOUT,">&", \*OLDOUT)ordie"Can't restore STDOUT:$!"; |
| 39 | +open(STDOUT,">&", \*OLDOUT)ordie"can't restore STDOUT:$!"; |
40 | 40 |
|
41 | 41 | # just in case
|
42 | 42 | close REGRESS_IN;
|
43 | 43 |
|
44 | 44 | my$diff_status =system(
|
45 |
| -"diff -c\"$srcdir/$subdir/expected.out\" regress.out >regress.diff"); |
| 45 | +"diff -c\"$srcdir/$subdir/expected.out\" regress.out >regress.diff"); |
| 46 | + |
| 47 | +print"="x70,"\n"; |
46 | 48 | if ($diff_status == 0)
|
47 |
| - { |
48 |
| -print"="x70,"\n"; |
49 |
| -print"All tests passed\n"; |
50 |
| -exit 0; |
| 49 | +{ |
| 50 | +print"All tests passed\n"; |
| 51 | +exit 0; |
51 | 52 | }
|
52 | 53 | else
|
53 |
| - { |
54 |
| -print"="x70,"\n"; |
55 |
| -print<<EOF; |
| 54 | +{ |
| 55 | +print<<EOF; |
56 | 56 | FAILED: the test result differs from the expected output
|
57 | 57 |
|
58 | 58 | Review the difference in "$subdir/regress.diff"
|
59 | 59 | EOF
|
60 |
| -print"="x70,"\n"; |
61 |
| -exit 1; |
| 60 | +exit 1; |
62 | 61 | }
|