}
use Config;
-use File::Spec::Functions;
my $Is_VMSish = ($^O eq 'VMS');
my $skip_mode_checks =
$^O eq 'cygwin' && $ENV{CYGWIN} !~ /ntsec/;
-plan tests => 51;
+plan tests => 52;
my $tmpdir = tempfile();
my $tmpdir1 = tempfile();
`rm -f $tmpdir 2>/dev/null; mkdir $tmpdir 2>/dev/null`;
}
-chdir catdir(curdir(), $tmpdir);
+chdir $tmpdir;
`/bin/rm -rf a b c x` if -x '/bin/rm';
SKIP: {
if ($^O eq 'vos') {
- skip ("# TODO - hit VOS bug posix-973 - cannot resize an open file below the current file pos.", 5);
+ skip ("# TODO - hit VOS bug posix-973 - cannot resize an open file below the current file pos.", 6);
}
is(-s $tmpfile, 200, "fh resize to 200 working (filename check)");
is(-s $tmpfile, 100, "fh resize by IO slot working");
close FH;
+
+ my $n = "for_fs_dot_t$$";
+ open FH, ">$n" or die "open $n: $!";
+ print FH "bloh blah bla\n";
+ close FH or die "close $n: $!";
+ eval "truncate $n, 0; 1" or die;
+ ok !-z $n, 'truncate(word) does not fall back to file name';
+ unlink $n;
}
}
# this works on win32 only, because fs isn't casesensitive
ok(-e 'X', "rename working");
- 1 while unlink 'X';
+ unlink_all 'X';
chdir $wd || die "Can't cd back to $wd";
}