On Wed, Jan 19, 2005 at 07:52:20AM -0600, Ken Williams wrote:
>
> On Jan 18, 2005, at 10:33 PM, Yitzchak Scott-Thoennes wrote:
> >
> >Why is it using the pure perl routine? That's been known not to work
> >for quite some time (though the tests only used to get run if PERL_CORE
> >or a special env var were set), but AFAIK the pure perl routine is
> >never actually used for cygwin.
>
> Right, it's not using it, I'm just on a crusade to get the pure-perl
> version working wherever possible.
Could you add some comments explaining the algorithm?
> >I'm pretty sure it fails even not under a mount point (other than /).
> >
>
> I think that's a problem with how it handles symlinkes, and I believe
> I've got that figured out - it requires an explicit readlink() where it
> happens implicitly on *nix.
In bleadperl (recently brought up to Cwd 3.04_01), the test is still
failing on cygwin (except that it is now hardcoded to skip it and,
AFAICT unnecesarily, three others, for cygwin). Did what you think
would help not help? Are there any tests I can run for you?
This patch enables the _perl_abs_path tests for cygwin and todo's
the failing one:
--- perl/ext/Cwd/t/cwd.t.orig 2005-02-17 10:41:20.000000000 -0800
+++ perl/ext/Cwd/t/cwd.t 2005-02-20 11:08:52.872769600 -0800
@@no-spam -21,7 +21,7 @@no-spam
my $tests = 28;
# _perl_abs_path() currently only works when the directory separator
# is '/', so don't test it when it won't work.
-my $EXTRA_ABSPATH_TESTS = ($Config{prefix} =~ m/\//) && $^O ne 'cygwin';
+my $EXTRA_ABSPATH_TESTS = $Config{prefix} =~ m/\//;
$tests += 4 if $EXTRA_ABSPATH_TESTS;
plan tests => $tests;
@@no-spam -163,7 +163,11 @@no-spam
like($abs_path, qr|$want$|);
like($fast_abs_path, qr|$want$|);
- like(Cwd::_perl_abs_path("linktest"), qr|$want$|) if $EXTRA_ABSPATH_TESTS;
+
+ if ($EXTRA_ABSPATH_TESTS) {
+ local $TODO = "not yet working for cygwin" if $^O eq 'cygwin';
+ like(Cwd::_perl_abs_path("linktest"), qr|$want$|);
+ }
rmtree($test_dirs[0], 0, 0);
unlink "linktest";