File: null-rr.t

package info (click to toggle)
libnet-dns-zonefile-fast-perl 1.24-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 256 kB
  • ctags: 40
  • sloc: perl: 1,284; makefile: 2
file content (25 lines) | stat: -rw-r--r-- 612 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# This is -*- perl -*-

use Net::DNS;
use Net::DNS::ZoneFile::Fast;
use Test::More tests => 4;

my $zone = q{
$ORIGIN choicecarecard.com.
dddwww		IN	A	199.93.70.72
		IN	A	199.93.70.210
};

my $rrset = Net::DNS::ZoneFile::Fast::parse($zone);

ok(defined $rrset, "Parsing of the zone file");
ok(@$rrset == 2, "Correct number of records");
ok($rrset->[0]->string 
   eq Net::DNS::RR->new("dddwww.choicecarecard.com. 0 IN A 199.93.70.72")->string,
   "First dummy RR is ok");

ok($rrset->[1]->string 
   eq Net::DNS::RR->new("dddwww.choicecarecard.com. 0 IN A 199.93.70.210")->string,
   "Second dummy RR is ok");