Skip to content

Commit

Permalink
[perl #115962] cwd.t: Add test for fast_abs_path in LF dir
Browse files Browse the repository at this point in the history
  • Loading branch information
Father Chrysostomos committed Dec 3, 2012
1 parent ea5a229 commit 52ee8d0
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion dist/Cwd/t/cwd.t
Expand Up @@ -36,7 +36,7 @@ if ($IsVMS) {
$vms_mode = 0 if ($vms_unix_rpt);
}

my $tests = 30;
my $tests = 31;
# _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';
Expand Down Expand Up @@ -245,6 +245,16 @@ SKIP: {
if $EXTRA_ABSPATH_TESTS;
}

SKIP: {
my $dir = "${$}a\nx";
mkdir $dir or skip "OS does not support dir names containing LF";
chdir $dir or skip "OS cannot chdir into LF";
eval { Cwd::fast_abs_path() };
is $@, "", 'fast_abs_path does not die in dir whose name contains LF';
chdir File::Spec->updir;
rmdir $dir;
}


#############################################
# These routines give us sort of a poor-man's cross-platform
Expand Down

0 comments on commit 52ee8d0

Please sign in to comment.