ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/AnyEvent/t/65_event_05_dns.t
Revision: 1.6
Committed: Fri Aug 12 18:41:28 2011 UTC (12 years, 9 months ago) by root
Content type: application/x-troff
Branch: MAIN
CVS Tags: rel-7_0, rel-6_0, rel-6_1, rel-6_14, rel-6_11, rel-6_12, rel-6_13, rel-7_04, rel-7_01, rel-7_02, rel-7_03, rel-6_02, rel-6_01
Changes since 1.5: +5 -2 lines
Log Message:
*** empty log message ***

File Contents

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