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.7 by root, Thu Apr 5 03:13:27 2012 UTC vs.
Revision 1.8 by root, Fri Apr 13 08:34:08 2012 UTC

3$| = 1; 3$| = 1;
4 4
5# not tested: symlink, readlink, link, utime, chown, chmod 5# not tested: symlink, readlink, link, utime, chown, chmod
6 6
7BEGIN { 7BEGIN {
8 print "1..38\n"; 8 print "1..37\n";
9 print "ok 1 # MODEL=$AnyEvent::IO::MODEL\n"; 9 print "ok 1 # MODEL=$AnyEvent::IO::MODEL\n";
10} 10}
11use AnyEvent; 11use AnyEvent;
12use AnyEvent::IO qw(:DEFAULT :flags); 12use AnyEvent::IO qw(:DEFAULT :flags);
13BEGIN { 13BEGIN {
41 t 0, open => "$DIR/test", O_CREAT | O_EXCL | O_WRONLY, 0666; 41 t 0, open => "$DIR/test", O_CREAT | O_EXCL | O_WRONLY, 0666;
42 42
43t 0, rmdir => $DIR; 43t 0, rmdir => $DIR;
44 44
45t 1, write => $fh, "tes--"; 45t 1, write => $fh, "tes--";
46t 1, write => $fh, "test2truncate"; 46t 1, write => $fh, "test2";
47t 1, write => $fh, ""; 47t 1, write => $fh, "";
48 48
49t 1, seek => $fh, 3, 0; 49t 1, seek => $fh, 3, 0;
50t 1, write => $fh, "t1"; 50t 1, write => $fh, "t1";
51 51
52t 1, truncate => $fh, 5+5; 52#t 1, truncate => $fh, 5+5; # not available on windows
53 53
54t 1, stat => $fh; 54t 1, stat => $fh;
55print -s _ != 10 ? "not " : "", "ok ", $t++, " # stat size\n"; 55print -s _ != 10 ? "not " : "", "ok ", $t++, " # stat size\n";
56 56
57t 1, close => $fh; 57t 1, close => $fh;
58 58
59t 1, stat => "$DIR/test"; 59t 1, stat => "$DIR/test";
60print -s _ != 10 ? "not " : "", "ok ", $t++, " # stat size\n"; 60print -s _ != 10 ? "not " : "", "ok ", $t++, " # stat size (", -s _,")\n";
61 61
62t 1, lstat => "$DIR/test"; 62t 1, lstat => "$DIR/test";
63print -s _ != 10 ? "not " : "", "ok ", $t++, " # lstat size\n"; 63print -s _ != 10 ? "not " : "", "ok ", $t++, " # lstat size\n";
64 64
65t 1, rename => "$DIR/test", "$DIR/test2"; 65t 1, rename => "$DIR/test", "$DIR/test2";

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines