Adriano Ferreira wrote:
[...]
------------------------------
TEST OUTPUT
------------------------------
Output from '/usr/bin/make test':
/usr/local/bin/perl.exe "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib',
'blib/arch')" t/*.t
t/Path.....
# Failed test 'make directory with trailing parent segment'
# at t/Path.t line 58.
# got: '0'
# expected: '1'
# Failed test 'made parent'
# at t/Path.t line 59.
# got: undef
# expected: 'test-464c9d3c-c5c-a503/B'
# Looks like you failed 2 tests of 71.
Interesting.
What that code is doing is:
my $dir = catdir($tmp_base, 'B');
my $dir2 = catdir($dir, updir());
# thus... foo/B/..
# which gets split up as mkdir foo, mkdir B, mkdir ..
# so it should at least have created foo/B
@created = mkpath($dir2, {mask => 0700});
is(scalar(@created), 1, "make directory with trailing parent segment");
# yet it didn't, since the above failed
is($created[0], $dir, "made parent");
# in fact, it didn't do anything, as $created[0] is undef
So there's something fishy going on in Cygwin land, Especially since the
code isn't doing any canonicalisation do transform foo/B/.. into bare foo/
Adriano, can you run prove on t/Path.t using your system Perl (and thus
the old File::Path lib)? There were minimal tests in the original code,
certainly nothing that tests this behaviour. Nonetheless I would not be
willing to consider that it has uncovered a latent bug after all this time.
Thanks,
David