Lines Matching full:io
37 use IO::Handle qw(SEEK_SET SEEK_CUR SEEK_END);
126 # these tests come almost 100% from IO::String
130 my $io = $CompressClass->new($name);
132 is $io->tell(), 0 ;
135 print $io $heisan ;
137 ok ! $io->eof;
139 is $io->tell(), length($heisan) ;
141 print($io "a", "b", "c");
145 print $io "d", "e";
147 print $io "f", "g", "h";
152 ok syswrite($io, $foo, length($foo)) == length($foo) ;
154 { is $io->syswrite($foo, length $foo), length $foo }
156 { is $io->syswrite($foo), length $foo }
157 ok $io->syswrite($foo, length($foo)) == length $foo;
158 ok $io->write($foo, length($foo), 5) == 5;
159 ok $io->write("xxx\n", 100, -1) == 1;
162 printf $io "i(%d)", $_;
163 $io->printf("[%d]\n", $_);
165 select $io;
169 close $io ;
171 ok $io->eof;
200 my $io = $UncompressClass->can('new')->( $UncompressClass, $name );
202 ok ! $io->eof, " Not EOF";
203 is $io->tell(), 0, " Tell is 0" ;
204 my @lines = <$io>;
210 is $io->tell(), length($str) ;
212 ok $io->eof;
214 ok ! ( defined($io->getline) ||
215 (@tmp = $io->getlines) ||
216 defined(<$io>) ||
217 defined($io->getc) ||
218 read($io, $buf, 100) != 0) ;
224 my $io = $UncompressClass->new($name);
225 ok !$io->eof;
226 my @lines = $io->getlines;
227 ok $io->eof;
230 $io = $UncompressClass->new($name);
231 ok ! $io->eof;
232 my $line = <$io>;
234 ok $io->eof;
239 my $io = $UncompressClass->new($name);
240 ok ! $io->eof;
241 my @lines = <$io>;
242 ok $io->eof;
252 my $io = $UncompressClass->new($name);
256 ok ! $io->eof;
257 while (<$io>) {
263 ok $io->eof;
277 my $io = $UncompressClass->new($name);
281 eval { read($io, $buf, -1) } ;
285 is read($io, $buf, 0), 0, "Requested 0 bytes" ;
287 ok read($io, $buf, 3) == 3 ;
290 ok sysread($io, $buf, 3, 2) == 3 ;
293 ok ! $io->eof;
295 # $io->seek(-4, 2);
297 # ok ! $io->eof;
299 # ok read($io, $buf, 20) == 4 ;
302 # ok read($io, $buf, 20) == 0 ;
305 # ok ! $io->eof;
328 my $io = $UncompressClass->can('new')->( $UncompressClass, $name, -Transparent => 1 );
330 ok defined $io;
331 ok ! $io->eof;
332 ok $io->tell() == 0 ;
333 my @lines = <$io>;
338 ok $io->tell() == length($str) ;
340 ok $io->eof;
342 ok ! ( defined($io->getline) ||
343 (@tmp = $io->getlines) ||
344 defined(<$io>) ||
345 defined($io->getc) ||
346 read($io, $buf, 100) != 0) ;
352 my $io = $UncompressClass->new($name);
353 ok ! $io->eof;
354 my @lines = $io->getlines;
355 ok $io->eof;
358 $io = $UncompressClass->new($name);
359 ok ! $io->eof;
360 my $line = <$io>;
362 ok $io->eof;
367 my $io = $UncompressClass->new($name);
368 ok ! $io->eof;
369 my @lines = <$io>;
370 ok $io->eof;
380 my $io = $UncompressClass->new($name);
384 ok ! $io->eof;
385 while (<$io>) {
391 ok $io->eof;
404 my $io = $UncompressClass->new($name);
406 ok read($io, $buf, 3) == 3 ;
409 ok sysread($io, $buf, 3, 2) == 3 ;
411 ok ! $io->eof;
413 # $io->seek(-4, 2);
415 # ok ! $io->eof;
417 # ok read($io, $buf, 20) == 4 ;
420 # ok read($io, $buf, 20) == 0 ;
423 # ok ! $io->eof;
465 my $io = $UncompressClass->new($name,
471 is $io->tell(), 0;
474 1 while $io->read($buf, $bufsize) > 0;
478 $buf .= $tmp while $io->read($tmp, $bufsize) > 0 ;
482 ok ! $io->error() ;
483 ok $io->eof;