Skip to content

Commit d0eb164

Browse files
committed
Test we are at EOF after nqp::readallfh.
1 parent 51585c8 commit d0eb164

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

t/nqp/19-file-ops.t

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# Test nqp::op file operations.
44

5-
plan(66);
5+
plan(67);
66

77
ok( nqp::stat('CREDITS', nqp::const::STAT_EXISTS) == 1, 'nqp::stat exists');
88
ok( nqp::stat('AARDVARKS', nqp::const::STAT_EXISTS) == 0, 'nqp::stat not exists');
@@ -23,6 +23,7 @@ ok( !nqp::eoffh($credits), 'Not at EOF after first line read');
2323
ok( nqp::chars($line) == 5 || nqp::chars($line) == 6, 'nqp::readlinefh line to read'); # =pod\r?\n
2424
ok( nqp::tellfh($credits) == 5 || nqp::tellfh($credits) == 6, 'nqp::tellfh line two');
2525
my $rest := nqp::readallfh($credits);
26+
ok( nqp::eoffh($credits), 'At EOF after readallfh');
2627
ok( nqp::chars($rest) > 100, 'nqp::readallfh lines to read');
2728
ok( nqp::tellfh($credits) >= nqp::chars($line) + nqp::chars($rest), 'nqp::tellfh end of file');
2829

0 commit comments

Comments
 (0)