ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/cvsroot/Async-Interrupt/t/06_epipe.t
Revision: 1.2
Committed: Sat May 15 00:08:48 2010 UTC (16 years, 4 months ago) by root
Content type: application/x-troff
Branch: MAIN
CVS Tags: rel-1_1, rel-1_2, rel-1_05, rel-1_24, rel-1_25, rel-1_26, rel-1_21, rel-1_22, rel-1_23, HEAD
Changes since 1.1: +4 -1 lines
Log Message:
1.05

File Contents

# Content
1 #! perl
2
3 no warnings;
4
5 print "1..6\n"; $|=1;
6
7 use Async::Interrupt;
8
9 my $ep = new Async::Interrupt::EventPipe;
10
11 my $fd = $ep->fileno;
12
13 print "ok 1\n";
14
15 my ($vr, $vR); vec ($vr, $fd, 1) = 1;
16
17 my $n = select $vR=$vr, undef, undef, 0;
18
19 print $n == 0 ? "" : "not ", "ok 2 # $n\n";
20
21 $ep->signal;
22
23 my $n = select $vR=$vr, undef, undef, 0;
24 print $n == 1 ? "" : "not ", "ok 3 # $n\n";
25
26 $ep->drain;
27
28 my $n = select $vR=$vr, undef, undef, 0;
29 print $n == 0 ? "" : "not ", "ok 4 # $n\n";
30
31 print "ok 5 # ", join " ", $ep->signal_func, "\n";
32 print "ok 6 # ", join " ", $ep->drain_func, "\n";