~ubuntu-branches/ubuntu/precise/libanyevent-perl/precise

« back to all changes in this revision

Viewing changes to t/69_ev_05_dns.t

  • Committer: Bazaar Package Importer
  • Author(s): Alessandro Ghedini, Ansgar Burchardt, Salvatore Bonaccorso, Alessandro Ghedini
  • Date: 2011-08-26 14:41:42 UTC
  • mfrom: (1.4.9 upstream)
  • Revision ID: james.westby@ubuntu.com-20110826144142-kyv02a88kc6pyait
Tags: 6.010-1
[ Ansgar Burchardt ]
* debian/control: Convert Vcs-* fields to Git.

[ Salvatore Bonaccorso ]
* debian/copyright: Replace DEP5 Format-Specification URL from
  svn.debian.org to anonscm.debian.org URL.

[ Alessandro Ghedini ]
* New upstream release
* Update upstream copyright years
* Re-order (Build-)Depends
* Add debian/NEWS with incompatible changes and deprecations
* Move libasync-interrupt-perl to Suggests
* Add libtask-weaken-perl to Suggests
* Run loop tests
* Add libevent-perl, libglib-perl, libio-async-perl, libnet-ssleay-perl, 
  libpoe-perl and perl-tk to Build-Depends (needed by tests) and Suggests
* Run tests under xvfb (due to Tk tests), update Build-Depends accordingly

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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::EV;1} or ((print qq{1..0 # SKIP AnyEvent::Impl::EV 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