diff options
author | Tony Cook <tony@develop-help.com> | 2014-10-20 15:13:21 +1100 |
---|---|---|
committer | Tony Cook <tony@develop-help.com> | 2014-10-20 15:13:21 +1100 |
commit | c1976a97f7ea6ecccbf8daf996f3690e227243e4 (patch) | |
tree | aa2de38f5201d0a95e7bcf5b272ec89ecefab66e /lib/File | |
parent | 860874cfffe19048bac963f61026dd7307337549 (diff) | |
download | perl-c1976a97f7ea6ecccbf8daf996f3690e227243e4.tar.gz |
use a different name for the test directory
on Windows (cygwin) I was getting rare failures creating $copy1 with
an error complaining that it was a directory, possibly due to some
background process tracking directories.
Diffstat (limited to 'lib/File')
-rw-r--r-- | lib/File/Copy.t | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/File/Copy.t b/lib/File/Copy.t index 16b951d75d..0e83a37e50 100644 --- a/lib/File/Copy.t +++ b/lib/File/Copy.t @@ -292,6 +292,7 @@ SKIP: { my $copy4 = "copy4-$$"; my $copy5 = "copy5-$$"; my $copy6 = "copy6-$$"; + my $copyd = "copyd-$$"; open my $fh => ">", $src or die $!; close $fh or die $!; @@ -317,11 +318,11 @@ SKIP: { # Test that we can actually set a file to the correct permission. # Slightly convoluted, because some operating systems will let us # set a directory, but not a file. These should all work: - mkdir $copy1 or die "Can't mkdir $copy1: $!"; - chmod $s_perm, $copy1 - or die sprintf "Can't chmod %o $copy1: $!", $s_perm; - rmdir $copy1 - or die sprintf "Can't rmdir $copy1: $!"; + mkdir $copyd or die "Can't mkdir $copyd: $!"; + chmod $s_perm, $copyd + or die sprintf "Can't chmod %o $copyd: $!", $s_perm; + rmdir $copyd + or die sprintf "Can't rmdir $copyd: $!"; open my $fh0, '>', $copy1 or die "Can't open $copy1: $!"; close $fh0 or die "Can't close $copy1: $!"; unless (chmod $s_perm, $copy1) { |