4 use Test::More skip_all => "infinite loop seen on FreeBSD [perl #132651]";
8 use File::Temp qw(tempdir);
11 my $tmp = tempdir(CLEANUP => 1);
12 unless(mkdir("$tmp/testdir") && chdir("$tmp/testdir") && rmdir("$tmp/testdir")){
13 plan skip_all => "can't be in non-existent directory";
17 my $EXTRA_ABSPATH_TESTS = ($Config{prefix} =~ m/\//) && $^O ne 'cygwin';
20 foreach my $type (qw(regular perl)) {
22 skip "_perl_abs_path() not expected to work", 4
24 !(($Config{prefix} =~ m/\//) && $^O ne "cygwin");
25 no warnings "redefine";
26 local *Cwd::abs_path = \&Cwd::_perl_abs_path if $type eq "perl";
27 local *Cwd::getcwd = \&Cwd::_perl_getcwd if $type eq "perl";
32 is $res, undef, "$type getcwd result on non-existent directory";
33 is $eno, ENOENT, "$type getcwd errno on non-existent directory";
35 $res = Cwd::abs_path(".");
37 is $res, undef, "$type abs_path result on non-existent directory";
38 is $eno, ENOENT, "$type abs_path errno on non-existent directory";
42 chdir $tmp or die "$tmp: $!";