develooper Front page | perl.perl5.porters | Postings from August 2012

[PATCH] Fix File::Copy test failure on Windows

Thread Next
From:
Steve Hay
Date:
August 27, 2012 10:20
Subject:
[PATCH] Fix File::Copy test failure on Windows
Message ID:
CADED=K48S1uD+Yj9wpEOrvPz+EKrsBOh=AOi57rLmcMgfn3m_w@mail.gmail.com
The attached patch fixes a failure in the new File::Copy tests added
by 43ddfa5614 (the ok(!copy...) test passes, but the
like($warn_message...) test fails because the code which sets the
expected warning isn't run on Windows).

However, I haven't applied it because it doesn't seem correct to me:
wouldn't it be more appropriate in this case for the copy to
"succeed", like the _eq($from, $to) case a few lines earlier in
Copy.pm does?

That can be achieved by changing the new return 0 which this patch
adds to return 1 and adjusting the test script accordingly, although
that would involve the test script replicating the same d_symlink /
d_readlink / d_link logic as Copy.pm has, which doesn't seem ideal
(unless *that* case is also changed to return 1...).

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About