/* delay EOF state for a snarfed empty file */
#define SNARF_EOF(gimme,rs,io,sv) \
(gimme != G_SCALAR || SvCUR(sv) \
- || !RsSNARF(rs) || (IoFLAGS(io) & IOf_NOLINE) \
- || ((IoFLAGS(io) |= IOf_NOLINE), FALSE))
+ || (IoFLAGS(io) & IOf_NOLINE) || !RsSNARF(rs))
for (;;) {
if (!sv_gets(sv, fp, offset)
SvTAINTED_on(sv);
}
IoLINES(io)++;
+ IoFLAGS(io) |= IOf_NOLINE;
SvSETMAGIC(sv);
XPUSHs(sv);
if (type == OP_GLOB) {
unshift @INC, '../lib';
}
-print "1..20\n";
+print "1..21\n";
use File::Spec;
local $/;
open F, 'Io_argv1.tmp' or die;
<F>; # set $. = 1
+ print "not " if defined(<F>); # should hit eof
+ print "ok 16\n";
open F, $devnull or die;
print "not " unless defined(<F>);
- print "ok 16\n";
- print "not " if defined(<F>);
print "ok 17\n";
print "not " if defined(<F>);
print "ok 18\n";
+ print "not " if defined(<F>);
+ print "ok 19\n";
open F, $devnull or die; # restart cycle again
print "not " unless defined(<F>);
- print "ok 19\n";
- print "not " if defined(<F>);
print "ok 20\n";
+ print "not " if defined(<F>);
+ print "ok 21\n";
close F;
}