--- EV/t/04_stat.t 2007/11/27 07:27:10 1.1 +++ EV/t/04_stat.t 2007/11/28 17:32:24 1.3 @@ -1,4 +1,4 @@ -BEGIN { $| = 1; print "1..6\n"; } +BEGIN { $| = 1; print "1..14\n"; } no warnings; use strict; @@ -11,6 +11,16 @@ my $w = EV::stat "$fh", 0.1, sub { print "ok 5\n"; + print 1 == $_[0]->prev ? "" : "not ", "ok 6\n"; + print 13 == scalar (() = $_[0]->prev) ? "" : "not ", "ok 7\n"; + print "0" eq -s _ ? "" : "not ", "ok 8\n"; + print 1 == ($_[0]->prev)[3] ? "" : "not ", "ok 9\n"; + + print 0 == $_[0]->attr ? "" : "not ", "ok 10\n"; + print 0 == ($_[0]->attr)[3] ? "" : "not ", "ok 11\n"; + + print 0 == $_[0]->stat ? "" : "not ", "ok 12\n"; + print 0 == ($_[0]->stat)[3] ? "" : "not ", "ok 13\n"; EV::unloop; }; @@ -23,7 +33,8 @@ EV::loop; print "ok 3\n"; -syswrite $fh, "size change"; +# delete the file, as windows will not update any stats otherwise :( +undef $fh; my $t = EV::timer 0.2, 0, sub { print "no ok 5\n"; @@ -32,5 +43,5 @@ print "ok 4\n"; EV::loop; -print "ok 6\n"; +print "ok 14\n";