| 1 | 1 | ▶ | use Test::More tests => 12; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 2 | 1 | ▶ | use NetAddr::IP::Lite; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 3 | |||||||||||
| 4 | 1 | my @good = (qw(default any broadcast loopback)); | |||||||||
| 5 | 1 | my @bad = map { ("$_.neveranydomainlikethis.in-addr.arpa", | |||||||||
| 6 | "nohostlikethis.${_}.in-addr.arpa") } @good; | ||||||||||
| 7 | |||||||||||
| 8 | 1 | my $bad = scalar @bad; | |||||||||
| 9 | |||||||||||
| 10 | 1 | diag <<EOF; | |||||||||
| 11 | |||||||||||
| 12 | \tThe following $bad tests involve resolving (hopefully) | ||||||||||
| 13 | \tnon-existant names. This may take a while. | ||||||||||
| 14 | EOF | ||||||||||
| 15 | |||||||||||
| 16 | SKIP: { | ||||||||||
| 17 | 1 | ▶ | skip "defective or missing resolver", 12, | ||||||||
|
Branch: 1 branch
| |||||||||||
| 18 | if defined NetAddr::IP::Lite->new('not.defined.in-addr.arpa'); | ||||||||||
| 19 | ok(!defined NetAddr::IP::Lite->new($_), "not defined ->new($_)") | ||||||||||
| 20 | 1 | for @bad; | |||||||||
| 21 | ok(defined NetAddr::IP::Lite->new($_), "defined ->new($_)") | ||||||||||
| 22 | 1 | for @good; | |||||||||
| 23 | }; | ||||||||||