3 # Make sure we can fetch a record in the middle of the file
4 # before we've ever looked at any records before it
6 # Make sure fetching past the end of the file returns the undefined value
8 # (tests _fill_offsets_to() )
11 my $file = "tf$$.txt";
12 $: = Tie::File::_default_recsep();
13 my $data = "rec0$:rec1$:rec2$:";
19 print "ok $N\n"; $N++;
21 open F, "> $file" or die $!;
27 my $o = tie @a, 'Tie::File', $file, autochomp => 0;
28 print $o ? "ok $N\n" : "not ok $N\n";
38 print $rec eq "rec$_$:" ? "ok $N\n" : "not ok $N # rec=<$rec> ?\n";
45 print ((not defined $rec) ? "ok $N\n" : "not ok $N # rec=<$rec> is defined\n");