ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/AnyEvent/t/66_ioasync_05_dns.t
Revision: 1.7
Committed: Mon Jul 4 21:14:29 2011 UTC (13 years, 5 months ago) by root
Content type: application/x-troff
Branch: MAIN
Changes since 1.6: +2 -1 lines
Log Message:
*** empty log message ***

File Contents

# User Rev Content
1 root 1.1 # we avoid complicated tests here because some systems will
2     # not have working DNS
3    
4 root 1.6 use AnyEvent;
5 root 1.7 BEGIN { eval q{use AnyEvent::Impl::IOAsync;1} or ((print qq{1..0 # SKIP AnyEvent::Impl::IOAsync not loadable
6     }), exit 0) }
7 root 1.1 use AnyEvent::DNS;
8    
9 root 1.3 $| = 1; print "1..5\n";
10    
11 root 1.1 print "ok 1\n";
12    
13     AnyEvent::DNS::resolver;
14    
15     print "ok 2\n";
16    
17     # make sure we timeout faster
18     AnyEvent::DNS::resolver->{timeout} = [0.5];
19     AnyEvent::DNS::resolver->_compile;
20    
21     print "ok 3\n";
22    
23     my $cv = AnyEvent->condvar;
24    
25     AnyEvent::DNS::a "www.google.de", sub {
26     print "ok 4 # www.google.de => @_\n";
27     $cv->send;
28     };
29    
30     $cv->recv;
31    
32     print "ok 5\n";
33