I am trying to install Path::Tiny on Windows 11 using a debug version of perl 5.37.6 using MinGW-w64 and gcc 11.3.0 from https://winlibs.com/ (using the MSVCRT runtime library), more information here: Perl/perl5#20395.
When testing Path::Tiny including the fix in #268 for realpath, the fix in #270 for lstat->size, and the fix in #272 for forward slashes, I get:
>gmake test
"C:\perl-debug\bin\perl.exe" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib\lib', 'blib\arch')" t/*.t
t/basename.t ...................... ok
t/basic.t ......................... ok
t/children.t ...................... ok
t/chmod.t ......................... ok
t/digest.t ........................ ok
t/exception.t ..................... ok
t/exports.t ....................... ok
t/filesystem.t .................... ok
t/has_same_bytes.t ................ ok
t/input_output.t .................. ok
t/input_output_no_PU_UU.t ......... ok
t/input_output_no_UU.t ............ ok
t/locking.t ....................... ok
t/mkdir.t ......................... ok
t/mkpath.t ........................ ok
t/mutable_tree_while_iterating.t .. ok
t/normalize.t ..................... ok
t/overloading.t ................... ok
t/parent.t ........................ ok
t/recurse.t ....................... 1/?
# Failed test 'Follow symlinks'
# at t/recurse.t line 139.
# Structures begin differing at:
# $got->[8] = 'qqqq.txt'
# $expected->[8] = 'pppp/ffff.txt'
# [
# 'aaaa.txt',
# 'bbbb.txt',
# 'cccc',
# 'gggg.txt',
# 'pppp',
# 'qqqq.txt',
# 'cccc/dddd.txt',
# 'cccc/eeee',
# 'cccc/eeee/ffff.txt'
# ]
# Looks like you failed 1 test of 1.
# Failed test 'iterator'
# at t/recurse.t line 141.
# Failed test 'Follow symlinks'
# at t/recurse.t line 146.
# Structures begin differing at:
# $got->[8] = 'qqqq.txt'
# $expected->[8] = 'pppp/ffff.txt'
# [
# 'aaaa.txt',
# 'bbbb.txt',
# 'cccc',
# 'gggg.txt',
# 'pppp',
# 'qqqq.txt',
# 'cccc/dddd.txt',
# 'cccc/eeee',
# 'cccc/eeee/ffff.txt'
# ]
# Looks like you failed 1 test of 1.
# Failed test 'visit'
# at t/recurse.t line 148.
# Looks like you failed 2 tests of 2.
# Failed test 'follow'
# at t/recurse.t line 149.
# Looks like you failed 1 test of 2.
# Failed test 'with symlinks'
# at t/recurse.t line 150.
# Looks like you failed 1 test of 2.
t/recurse.t ....................... Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/2 subtests
[...]
I believe the problem is again related to forward slashes in a symlink target, similar to what happend in #271. If you look at line 110 in recurse.t we see that a relative symlink target is constructed like this:
symlink path( 'cccc', 'eeee' ), path('pppp');
This will construct a symlink target with a relative path with forward slashes. It does not help to be explicit like for example:
symlink path( 'cccc\eeee' ), path('pppp');
trying to force the path to have backward slashes instead, since path() will replace backward slashes with forward slashes, see line 289 in Tiny.pm:
$path =~ tr[\\][/] if IS_WIN32();
I am trying to install
Path::Tinyon Windows 11 using a debug version of perl 5.37.6 using MinGW-w64 and gcc 11.3.0 from https://winlibs.com/ (using the MSVCRT runtime library), more information here: Perl/perl5#20395.When testing
Path::Tinyincluding the fix in #268 for realpath, the fix in #270 for lstat->size, and the fix in #272 for forward slashes, I get:I believe the problem is again related to forward slashes in a symlink target, similar to what happend in #271. If you look at line 110 in
recurse.twe see that a relative symlink target is constructed like this:This will construct a symlink target with a relative path with forward slashes. It does not help to be explicit like for example:
trying to force the path to have backward slashes instead, since
path()will replace backward slashes with forward slashes, see line 289 inTiny.pm: