X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Flib%2Fsyslfs.t;h=2bdb69d7e01ce9cd4291a68951a04f66de6d1fdd;hb=569bd3158af2276a406770e3d68e76b7da59b730;hp=721a68f59a667ce0e03df670c0c2306d4dac3096;hpb=6421506506a4cafd1649a8ef1a844697bb17eeee;p=p5sagit%2Fp5-mst-13.2.git diff --git a/t/lib/syslfs.t b/t/lib/syslfs.t index 721a68f..2bdb69d 100644 --- a/t/lib/syslfs.t +++ b/t/lib/syslfs.t @@ -1,134 +1,265 @@ # NOTE: this file tests how large files (>2GB) work with raw system IO. -# open(), tell(), seek(), print(), read() are tested in t/op/lfs.t. +# stdio: open(), tell(), seek(), print(), read() is tested in t/op/lfs.t. # If you modify/add tests here, remember to update also t/op/lfs.t. BEGIN { - # Don't bother if there are no quads. - eval { my $q = pack "q", 0 }; - if ($@) { - print "1..0\n# no 64-bit types\n"; - bye(); - } chdir 't' if -d 't'; - unshift @INC, '../lib'; + @INC = '../lib'; require Config; import Config; # Don't bother if there are no quad offsets. if ($Config{lseeksize} < 8) { - print "1..0\n# no 64-bit file offsets\n"; - bye(); + print "1..0 # Skip: no 64-bit file offsets\n"; + exit(0); } - require Fcntl; import Fcntl; + require Fcntl; import Fcntl qw(/^O_/ /^SEEK_/); } -sub bye { +use strict; + +our @s; +our $fail; + +sub zap { close(BIG); - unlink "big"; + unlink("big"); + unlink("big1"); + unlink("big2"); +} + +sub bye { + zap(); exit(0); } +my $explained; + +sub explain { + unless ($explained++) { + print <