Subject: | [PATCH] Clean up leftover temporary file in test suite |
The t/reporter.t test script opens a file, reads from it and then tries
to delete it. The deletion doesn't work on Windows, where it is
necessary to close the filehandle first.
The attached patch against 1.44 closes the filehandle first, thereby
cleaning up the file which otherwise gets left behind and causes the
test to fail next time if it run again.
Subject: | close.patch |
diff -ruN Test-Smoke-1.44\t\reporter.t Test-Smoke-1.44.orig\t\reporter.t
--- Test-Smoke-1.44\t\reporter.t Sat Mar 10 21:08:17 2012
+++ Test-Smoke-1.44.orig\t\reporter.t Mon Nov 01 18:12:32 2010
@@ -2112,7 +2112,6 @@
$in_string .= $_;
}
is($in_string, $report_string, "file is the same as the report");
- close $in;
unlink $file or die "Can't unlink file: $!";
}
else {