File: 03-question.t

package info (click to toggle)
libnet-dns-perl 0.19-0.1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 544 kB
  • ctags: 323
  • sloc: perl: 5,191; makefile: 54
file content (26 lines) | stat: -rw-r--r-- 558 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
22
23
24
25
26
# $Id: 03-question.t,v 1.3 2000/11/19 06:10:19 mfuhr Exp mfuhr $

BEGIN { $| = 1; print "1..5\n"; }
END {print "not ok 1\n" unless $loaded;}

use Net::DNS;

$loaded = 1;
print "ok 1\n";

$domain = "example.com";
$type   = "MX";
$class  = "IN";

$question = Net::DNS::Question->new($domain, $type, $class);
print "not " unless defined($question);
print "ok 2\n";

print "not " unless $question->qname eq $domain;
print "ok 3\n";

print "not " unless $question->qtype eq $type;
print "ok 4\n";

print "not " unless $question->qclass eq $class;
print "ok 5\n";