Upgrade to Tie::File 0.90, from mjd.
[p5sagit/p5-mst-13.2.git] / lib / Tie / File / t / 05_size.t
index 8f62c2a..695d379 100644 (file)
@@ -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()