File: v4-wnew.t

package info (click to toggle)
libnetaddr-ip-perl 4.007%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 728 kB
  • ctags: 92
  • sloc: perl: 715; pascal: 78; ansic: 77; makefile: 56; sh: 23
file content (21 lines) | stat: -rw-r--r-- 483 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
use Test::More tests => 12;
use NetAddr::IP::Lite;

my @good = (qw(default any broadcast loopback));
my @bad = map { ("$_.neveranydomainlikethis",
		 "nohostlikethis.$_") } @good;

ok(defined NetAddr::IP::Lite->new($_), "defined ->new($_)")
    for @good;

my $bad = scalar @bad;

diag <<EOF;

\tThe following $bad tests involve resolving (hopefully) 
\tnon-existant names. This may take a while.
EOF

ok(! defined NetAddr::IP::Lite->new($_), "not defined ->new($_)")
    for @bad;