ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/AnyEvent/t/io_common
(Generate patch)

Comparing AnyEvent/t/io_common (file contents):
Revision 1.4 by root, Wed Mar 28 23:45:47 2012 UTC vs.
Revision 1.5 by root, Mon Apr 2 04:03:02 2012 UTC

1#! perl 1#! perl
2 2
3$| = 1; 3$| = 1;
4 4
5BEGIN { 5BEGIN {
6 print "1..35\n"; 6 print "1..37\n";
7 print "ok 1 # MODEL=$AnyEvent::IO::MODEL\n"; 7 print "ok 1 # MODEL=$AnyEvent::IO::MODEL\n";
8} 8}
9use AnyEvent; 9use AnyEvent;
10use AnyEvent::IO qw(:DEFAULT :flags); 10use AnyEvent::IO qw(:DEFAULT :flags);
11BEGIN { 11BEGIN {
38my $fh = t 1, open => "$DIR/test", O_CREAT | O_EXCL | O_WRONLY, 0666; 38my $fh = t 1, open => "$DIR/test", O_CREAT | O_EXCL | O_WRONLY, 0666;
39 t 0, open => "$DIR/test", O_CREAT | O_EXCL | O_WRONLY, 0666; 39 t 0, open => "$DIR/test", O_CREAT | O_EXCL | O_WRONLY, 0666;
40 40
41t 0, rmdir => $DIR; 41t 0, rmdir => $DIR;
42 42
43t 1, write => $fh, "test1"; 43t 1, write => $fh, "tes--";
44t 1, write => $fh, "test2"; 44t 1, write => $fh, "test2";
45t 1, write => $fh, ""; 45t 1, write => $fh, "";
46
47t 1, seek => $fh, 3, 0;
48t 1, write => $fh, "t1";
46 49
47t 1, stat => $fh; 50t 1, stat => $fh;
48print -s _ != 10 ? "not " : "", "ok ", $t++, " # stat size\n"; 51print -s _ != 10 ? "not " : "", "ok ", $t++, " # stat size\n";
49 52
50t 1, close => $fh; 53t 1, close => $fh;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines