--- AnyEvent/t/05_dns.t 2008/05/23 16:36:02 1.2 +++ AnyEvent/t/05_dns.t 2008/05/24 17:21:50 1.3 @@ -1,5 +1,5 @@ $|=1; -BEGIN { print "1..2\n" } +BEGIN { print "1..5\n" } # we avoid complicated tests here because some systems will # not have working DNS @@ -13,3 +13,20 @@ print "ok 2\n"; +# make sure we timeout faster +AnyEvent::DNS::resolver->{timeout} = [0.5]; +AnyEvent::DNS::resolver->_compile; + +print "ok 3\n"; + +my $cv = AnyEvent->condvar; + +AnyEvent::DNS::a "www.google.de", sub { + print "ok 4 # www.google.de => @_\n"; + $cv->send; +}; + +$cv->recv; + +print "ok 5\n"; +