Subject: | realpath: different behavior on non-existent directory between Unix and Windows |
The following test script behaves differently on Windows and Unix (e.g. Linux, FreeBSD):
#!/usr/bin/perl -w
use strict;
use Test::More tests => 2;
use Cwd 'realpath';
ok defined realpath '.';
ok defined realpath 'thispathdoesnotexist';
__END__
On Unix the test script passes. On Windows it fails with:
thispathdoesnotexist: No such file or directory at t/cwd.t line 9.
I would expect that this behaves the same on both systems. The 2nd best solution would be some documentation on the different behavior.