Revision: | 1.5 |
Committed: | Thu Oct 21 15:13:42 2010 UTC (13 years, 8 months ago) by root |
Content type: | application/x-troff |
Branch: | MAIN |
CVS Tags: | EV-rel-4_28, EV-rel-4_29, EV-rel-4_26, EV-rel-4_27, EV-rel-4_25, EV-rel-4_22, EV-rel-4_20, EV-rel-4_21, rel-4_01, rel-4_00, rel-4_03, rel-4_02, EV-rel-4_31, EV-rel-4_30, EV-rel-4_33, EV-rel-4_32, EV-rel-4_34, EV_rel-4_11, EV_rel-4_10, EV-rel-4_15, EV_rel-4_17, EV_rel-4_16, EV-rel-4_18, HEAD |
Changes since 1.4: | +5 -5 lines |
Log Message: | port testsuite |
# | User | Rev | Content |
---|---|---|---|
1 | root | 1.3 | BEGIN { $| = 1; print "1..14\n"; } |
2 | root | 1.1 | |
3 | no warnings; | ||
4 | use strict; | ||
5 | |||
6 | use File::Temp; | ||
7 | |||
8 | use EV; | ||
9 | |||
10 | my $fh = new File::Temp UNLINK => 1; | ||
11 | |||
12 | my $w = EV::stat "$fh", 0.1, sub { | ||
13 | print "ok 5\n"; | ||
14 | root | 1.3 | print 1 == $_[0]->prev ? "" : "not ", "ok 6\n"; |
15 | print 13 == scalar (() = $_[0]->prev) ? "" : "not ", "ok 7\n"; | ||
16 | print "0" eq -s _ ? "" : "not ", "ok 8\n"; | ||
17 | print 1 == ($_[0]->prev)[3] ? "" : "not ", "ok 9\n"; | ||
18 | |||
19 | print 0 == $_[0]->attr ? "" : "not ", "ok 10\n"; | ||
20 | print 0 == ($_[0]->attr)[3] ? "" : "not ", "ok 11\n"; | ||
21 | |||
22 | print 0 == $_[0]->stat ? "" : "not ", "ok 12\n"; | ||
23 | print 0 == ($_[0]->stat)[3] ? "" : "not ", "ok 13\n"; | ||
24 | root | 1.5 | EV::break; |
25 | root | 1.1 | }; |
26 | |||
27 | my $t = EV::timer 0.2, 0, sub { | ||
28 | print "ok 2\n"; | ||
29 | root | 1.5 | EV::break; |
30 | root | 1.1 | }; |
31 | |||
32 | root | 1.4 | print $w->stat ? "" : "not ", "ok 1\n"; |
33 | root | 1.5 | EV::run; |
34 | root | 1.1 | print "ok 3\n"; |
35 | |||
36 | root | 1.3 | # delete the file, as windows will not update any stats otherwise :( |
37 | undef $fh; | ||
38 | root | 1.1 | |
39 | my $t = EV::timer 0.2, 0, sub { | ||
40 | print "no ok 5\n"; | ||
41 | root | 1.5 | EV::break; |
42 | root | 1.1 | }; |
43 | |||
44 | print "ok 4\n"; | ||
45 | root | 1.5 | EV::run; |
46 | root | 1.3 | print "ok 14\n"; |
47 | root | 1.1 |