summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/Fetish.pm8
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/Fetish.pm b/tests/Fetish.pm
index fd094f7c5..393858336 100644
--- a/tests/Fetish.pm
+++ b/tests/Fetish.pm
@@ -12,7 +12,7 @@ use FileHandle;
use File::Compare qw(compare);
@ISA = qw(Exporter);
-($VERSION = '$Revision: 1.15 $ ') =~ tr/[0-9].//cd;
+($VERSION = '$Revision: 1.16 $ ') =~ tr/[0-9].//cd;
@EXPORT = qw (run_tests);
my $debug = $ENV{DEBUG};
@@ -407,7 +407,6 @@ sub run_tests ($$$$$)
my $out = $actual{$eo};
my $orig = "$out.orig";
- warn "rename $out, $orig";
# Move $out aside (to $orig), then then recreate $out
# by transforming each line of $orig via $subst_expr.
rename $out, $orig
@@ -415,7 +414,10 @@ sub run_tests ($$$$$)
$fail = 1, next;
open IN, $orig
or (warn "$program_name: cannot open $orig for reading: $!\n"),
- $fail = 1, next;
+ $fail = 1, (unlink $orig), next;
+ unlink $orig
+ or (warn "$program_name: cannot unlink $orig: $!\n"),
+ $fail = 1;
open OUT, ">$out"
or (warn "$program_name: cannot open $out for writing: $!\n"),
$fail = 1, next;