From: Jarkko Hietaniemi Date: Thu, 12 Aug 1999 08:18:53 +0000 (+0000) Subject: Minor niggles on the lfs tests. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=6421506506a4cafd1649a8ef1a844697bb17eeee;p=p5sagit%2Fp5-mst-13.2.git Minor niggles on the lfs tests. p4raw-id: //depot/cfgperl@3963 --- diff --git a/t/lib/syslfs.t b/t/lib/syslfs.t index 8f89bdb..721a68f 100644 --- a/t/lib/syslfs.t +++ b/t/lib/syslfs.t @@ -14,7 +14,7 @@ BEGIN { require Config; import Config; # Don't bother if there are no quad offsets. if ($Config{lseeksize} < 8) { - print "1..0\n# no 64-bit offsets\n"; + print "1..0\n# no 64-bit file offsets\n"; bye(); } require Fcntl; import Fcntl; @@ -78,14 +78,14 @@ close BIG; print "# @s\n"; sub fail () { - print " not "; + print "not "; $fail++; } -fail unless $s[7] == 5_000_000_003; +fail unless $s[7] == 5_000_000_003; # exercizes pp_stat print "ok 1\n"; -fail unless -s "big" == 5_000_000_003; +fail unless -s "big" == 5_000_000_003; # exercizes pp_ftsize print "ok 2\n"; sysopen(BIG, "big", O_RDONLY) or do { warn "sysopen failed: $!\n"; bye }; diff --git a/t/op/lfs.t b/t/op/lfs.t index 345fa26..5d4b3a1 100644 --- a/t/op/lfs.t +++ b/t/op/lfs.t @@ -14,7 +14,7 @@ BEGIN { # Don't bother if there are no quad offsets. require Config; import Config; if ($Config{lseeksize} < 8) { - print "1..0\n# no 64-bit offsets\n"; + print "1..0\n# no 64-bit file offsets\n"; bye(); } } @@ -33,6 +33,8 @@ if ($^O eq 'win32' || $^O eq 'vms') { # Then try to deduce whether we have sparse files. +# Let's not depend on Fcntl or any other extension. + my ($SEEK_SET, $SEEK_CUR, $SEEK_END) = (0, 1, 2); # We'll start off by creating a one megabyte file which has @@ -79,14 +81,14 @@ close BIG; print "# @s\n"; sub fail () { - print " not "; + print "not "; $fail++; } -fail unless $s[7] == 5_000_000_003; +fail unless $s[7] == 5_000_000_003; # exercizes pp_stat print "ok 1\n"; -fail unless -s "big" == 5_000_000_003; +fail unless -s "big" == 5_000_000_003; # exercizes pp_ftsize print "ok 2\n"; open(BIG, "big") or do { warn "open failed: $!\n"; bye };