diff options
Diffstat (limited to 'dist/Cwd/t/cwd.t')
-rw-r--r-- | dist/Cwd/t/cwd.t | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/dist/Cwd/t/cwd.t b/dist/Cwd/t/cwd.t index c9a218725b..f7b03ed4fc 100644 --- a/dist/Cwd/t/cwd.t +++ b/dist/Cwd/t/cwd.t @@ -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'; @@ -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 |