X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FTie%2FFile%2Ft%2F05_size.t;h=695d379702e28f3fd61920a8c9298dae317cb10f;hb=6fc0ea7edd3ec54598574fd68aea53117bde11eb;hp=8f62c2a9206de711a2feaeead2a8d0a190ad376d;hpb=b3fe5a4cdcf4bcad47de92d4dfaa5a484780269b;p=p5sagit%2Fp5-mst-13.2.git diff --git a/lib/Tie/File/t/05_size.t b/lib/Tie/File/t/05_size.t index 8f62c2a..695d379 100644 --- a/lib/Tie/File/t/05_size.t +++ b/lib/Tie/File/t/05_size.t @@ -9,7 +9,7 @@ use POSIX 'SEEK_SET'; my $file = "tf$$.txt"; my ($o, $n); -print "1..15\n"; +print "1..16\n"; my $N = 1; use Tie::File; @@ -74,6 +74,17 @@ populate(); $#a = -1; check_contents(''); +# (16) 20020324 I have an idea that shortening the array will not +# expunge a cached record at the end if one is present. +$o->defer; +$a[3] = "record"; +my $r = $a[3]; +$#a = -1; +$r = $a[3]; +print (! defined $r ? "ok $N\n" : "not ok $N \# was <$r>; should be UNDEF\n"); +# Turns out not to be the case---STORESIZE explicitly removes them later +# 20020326 Well, but happily, this test did fail today. + # In the past, there was a bug in STORESIZE that it didn't correctly # remove deleted records from the the cache. This wasn't detected # because these tests were all done with an empty cache. populate()