X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fio%2Ffs.t;h=b897647106764d0a5f05d3483a638f2f9659bb41;hb=ac27d13b824657b726428f3a6a1d5b3a01df569e;hp=14b452e3fbf98099e2888eabd777b28db8466a31;hpb=b0fdffbddaf257157ac815b3869f2328fc8ab9a0;p=p5sagit%2Fp5-mst-13.2.git diff --git a/t/io/fs.t b/t/io/fs.t index 14b452e..b897647 100755 --- a/t/io/fs.t +++ b/t/io/fs.t @@ -49,7 +49,7 @@ $needs_fh_reopen = 1 if (defined &Win32::IsWin95 && Win32::IsWin95()); my $skip_mode_checks = $^O eq 'cygwin' && $ENV{CYGWIN} !~ /ntsec/; -plan tests => 49; +plan tests => 51; if (($^O eq 'MSWin32') || ($^O eq 'NetWare')) { @@ -58,6 +58,7 @@ if (($^O eq 'MSWin32') || ($^O eq 'NetWare')) { } elsif ($^O eq 'VMS') { `if f\$search("[.tmp]*.*") .nes. "" then delete/nolog/noconfirm [.tmp]*.*.*`; + `if f\$search("tmp.dir") .nes. "" then set file/prot=o:rwed tmp.dir;`; `if f\$search("tmp.dir") .nes. "" then delete/nolog/noconfirm tmp.dir;`; `create/directory [.tmp]`; } @@ -202,7 +203,7 @@ SKIP: { skip "has fchown", 1 if ($Config{d_fchown} || "") eq "define"; open(my $fh, "<", "a"); eval { chown(0, 0, $fh); }; - like($@, qr/^The fchown function is unimplemented at/, "fchown is unimplemented"); + like($@, qr/^The f?chown function is unimplemented at/, "fchown is unimplemented"); } is(rename('a','b'), 1, "rename a b"); @@ -412,7 +413,7 @@ SKIP: { # check if rename() can be used to just change case of filename SKIP: { skip "Works in Cygwin only if check_case is set to relaxed", 1 - if $^O eq 'cygwin'; + if ($ENV{'CYGWIN'} && ($ENV{'CYGWIN'} =~ /check_case:(?:adjust|strict)/)); chdir './tmp'; open(FH,'>x') || die "Can't create x"; @@ -439,5 +440,16 @@ else { ok(-d 'tmp1', "rename on directories working"); +{ + # Change 26011: Re: A surprising segfault + # to make sure only that these obfuscated sentences will not crash. + + map chmod(+()), ('')x68; + ok(1, "extend sp in pp_chmod"); + + map chown(+()), ('')x68; + ok(1, "extend sp in pp_chown"); +} + # need to remove 'tmp' if rename() in test 28 failed! END { rmdir 'tmp1'; rmdir 'tmp'; 1 while unlink "Iofs.tmp"; }