#!./perl
use Cwd;
BEGIN {
chdir 't' if -d 't';
}
use Config;
use strict;
use warnings;
# check imports
# XXX force Cwd to bootsrap its XSUBs since we have set @INC = "../lib"
# XXX and subsequent chdir()s can make them impossible to find
eval { fastcwd };
# Must find an external pwd (or equivalent) command.
my $pwd_cmd =
"cd" :
"pwd" :
$pwd_cmd =~ s,/,\\,g;
}
SKIP: {
# Win32's cd returns native C:\ style
# DCL SHOW DEFAULT has leading spaces
SKIP: {
# Darwin's getcwd(3) (which Cwd.xs:bsd_realpath() uses which
# Cwd.pm:getcwd uses) has some magic related to the PWD
# environment variable: if PWD is set to a directory that
# looks about right (guess: has the same (dev,ino) as the '.'?),
# the PWD is returned. However, if that path contains
# symlinks, the path will not be equal to the one returned by
# the path -trick). This situation is easy to reproduce since
# the PWD to force getcwd(3) to (re)compute the cwd in full.
# Admittedly fixing this in the Cwd module would be better
# long-term solution but deleting $ENV{PWD} should not be
# done light-heartedly. --jhi
my $fastgetcwd = fastgetcwd;
}
}
}
# Cwd::chdir should also update $ENV{PWD}
{
}
SKIP: {
}
#############################################
# These two routines give us sort of a poor-man's cross-platform
# directory comparison routine.
sub bracketed_form {
}
sub dir_ends_with {
}