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

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

Thread Previous | Thread Next
Tony Cook
August 27, 2012 15:18
Re: [PATCH] Fix File::Copy test failure on Windows
Message ID:
On Mon, Aug 27, 2012 at 06:19:58PM +0100, Steve Hay wrote:
> 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
> 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 has, which doesn't seem ideal
> (unless *that* case is also changed to return 1...).

Sorry for the test failure, I thought I'd tested on Win32 back when I
originally wrote it, so only tested on Linux this time around.

copy() is documented to fail when you try to copy a file over itself,
and it does in several cases.

754f2cd0b changed it to the current inconsistent behaviour.


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About