Open FGasper opened 5 years ago
> perl -MTest::MockFile -e'my $mf = Test::MockFile->file("/some/path", undef); -e "/some/path"; print "$!"'
Bad file descriptor
Hmm.... This might not be a bug in T::MF it might be https://github.com/CpanelInc/Overload-FileCheck/issues but I'll check.
Actually on more reflection, I'm 99% certain it's an Overload issue.
with the release of Overload-FileCheck v0.12 and the last version of Test-MockFile (installed from master)
> perl -MTest::MockFile -e'my $mf = Test::MockFile->file("/some/path", undef); -e "/some/path"; print "$!"'
No such file or director
So I think this is fixed need to wait and confirm for the release of both
To correctly mock nonexistence of a file, -e should set $! to ENOENT, not EBADF. Otherwise logic that does due diligence and reports non-ENOENT failures after a -e check will report a failure.