Commit fc4a8a6d authored by Alvaro Herrera's avatar Alvaro Herrera

perltidy adjustments to new file

parent 628cbb50
...@@ -27,36 +27,35 @@ open(STDERR, ">&", \*STDOUT) or die "can't dup STDOUT: $!"; ...@@ -27,36 +27,35 @@ open(STDERR, ">&", \*STDOUT) or die "can't dup STDOUT: $!";
# read lines from regress.in and run uri-regress on them # read lines from regress.in and run uri-regress on them
while (<REGRESS_IN>) while (<REGRESS_IN>)
{ {
chomp; chomp;
print "trying $_\n"; print "trying $_\n";
system("./uri-regress \"$_\""); system("./uri-regress \"$_\"");
print "\n"; print "\n";
} }
# restore STDOUT/ERR so we can print the outcome to the user # restore STDOUT/ERR so we can print the outcome to the user
open(STDERR, ">&", \*OLDERR) or die; # can't complain as STDERR is still duped open(STDERR, ">&", \*OLDERR) or die; # can't complain as STDERR is still duped
open(STDOUT, ">&", \*OLDOUT) or die "Can't restore STDOUT: $!"; open(STDOUT, ">&", \*OLDOUT) or die "can't restore STDOUT: $!";
# just in case # just in case
close REGRESS_IN; close REGRESS_IN;
my $diff_status = system( my $diff_status = system(
"diff -c \"$srcdir/$subdir/expected.out\" regress.out >regress.diff"); "diff -c \"$srcdir/$subdir/expected.out\" regress.out >regress.diff");
print "=" x 70, "\n";
if ($diff_status == 0) if ($diff_status == 0)
{ {
print "=" x 70, "\n"; print "All tests passed\n";
print "All tests passed\n"; exit 0;
exit 0;
} }
else else
{ {
print "=" x 70, "\n"; print <<EOF;
print <<EOF;
FAILED: the test result differs from the expected output FAILED: the test result differs from the expected output
Review the difference in "$subdir/regress.diff" Review the difference in "$subdir/regress.diff"
EOF EOF
print "=" x 70, "\n"; exit 1;
exit 1;
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment