diff options
author | Father Chrysostomos <sprout@cpan.org> | 2012-12-02 18:53:23 -0800 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2012-12-03 08:53:44 -0800 |
commit | 52ee8d0ab0016f47e2280ef34ee0f8e2d7ee2590 (patch) | |
tree | 03b7042b26d94fb1ea33f1bba2dcd4c2ed33f1dd /dist/Cwd | |
parent | ea5a229a68de4c28f958df96cd57ae768501de7a (diff) | |
download | perl-52ee8d0ab0016f47e2280ef34ee0f8e2d7ee2590.tar.gz |
[perl #115962] cwd.t: Add test for fast_abs_path in LF dir
Diffstat (limited to 'dist/Cwd')
-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 |