1N/Aprint "ok $N\n"; $N++;
1N/Aprint $o ?
"ok $N\n" :
"not ok $N\n";
1N/A# 9-14 same-length alterations 1N/A# 15-24 lengthening alterations 1N/A# 25-34 shortening alterations, including truncation 1N/A# (35-38) file with holes 1N/A# (39-40) zero out file 1N/A# (41-42) insert into the middle of an empty file 1N/A# (43-47) 20020326 You thought there would be a bug in STORE where if 1N/A# a cached record was false, STORE wouldn't see it at all. Yup, there is, 1N/A# and adding the appropriate defined() test fixes the problem. 1N/Aprint $o ?
"ok $N\n" :
"not ok $N\n";
1N/Amy $z = $a[
1];
# caches "0" 1N/A# (48-56) 20020331 Make sure we correctly handle the case where the final 1N/A# record of the file is not properly terminated, Through version 0.90, 1N/A# we would mangle the file. 1N/A print $n == 1 ? "ok $N\n" : "not ok $N \# expected 1 elt, got $n\n"; 1N/A : "not ok $N \# expected <$badrec>, got <$r[0]>\n"; 1N/A# (57-58) 20020402 The modification would have failed if $\ were set wrong. 1N/A { local $\ = "I hate \$\\."; 1N/A# (59) 20030527 Tom Christiansen pointed out that FETCH returns the wrong 1N/A# data on the final record of an unterminated file if the file is opened 1N/A# in read-only mode. Note that the $#a is necessary here. 1N/A# There's special-case code to fix the final record when it is read normally. 1N/A# But the $#a forces it to be read from the cache, which skips the 1N/A print $z eq "hello" ? "ok $N\n" : 1N/A "not ok $N \# got $z, expected hello\n"; 1N/A print "ok $N \# skipped - can't create improperly terminated file\n"; 1N/A my $msg = "# expected <$x>, got <$a>";