File: 03-question.t

package info (click to toggle)
libnet-dns-perl 0.12-2
  • links: PTS
  • area: main
  • in suites: slink
  • size: 452 kB
  • ctags: 266
  • sloc: perl: 4,047; makefile: 52; sh: 17
file content (26 lines) | stat: -rw-r--r-- 547 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
26
# $Id: 03-question.t,v 1.2 1997/03/28 02:34:57 mfuhr Exp $

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

use Net::DNS;

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

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

$question = new Net::DNS::Question($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";