@INC = '../lib';
}
-use Test::More tests => 25;
+use Test::More tests => 27;
use_ok('Tie::StdHandle');
ok(print($f "rhubarb"), "print rhubarb"); # line 4
}
+ok(syswrite($f, "123456789\n", 3, 7), "syswrite");# line 5
+
# read some lines back
ok(seek($f,0,0), "seek");
$b = <$f>;
is($b, "rhubarbX\n", "b eq rhubarbX");
+# line 5
+
+$b = <$f>;
+is($b, "89\n", "b eq 89");
+
ok(eof($f), "eof");
ok(close($f), "close");
{
my $fh = $_[0];
local $\; # don't print any line terminator
- print $fh substr($_[1],0,$_[2])
+ print $fh substr($_[1], $_[3], $_[2]);
}