Skip Menu |

This queue is for tickets about the Test-Smoke CPAN distribution.

Report information
The Basics
Id: 75681
Status: resolved
Priority: 0/
Queue: Test-Smoke

People
Owner: Nobody in particular
Requestors: shay [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.44
Fixed in: 1.47



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 {
Integrated. -- Abe.
On Fri Mar 16 20:37:49 2012, ABELTJE wrote: Show quoted text
> Integrated. > > -- Abe.
Unfortunately you have not applied the patch correctly! You've added "close $file" (where $file is the filename!) rather than "close $in" (where $in is the filehandle). (I also have a new test failure from 1.46 in syncer_rsync.t, which I will report separately.)
sorry about that, now done proper. -- Abe.