# $Id: 05-rr-txt.t 264 2005-04-06 09:16:15Z olaf $   -*-perl-*-

use Test::More tests => 7;
use strict;

BEGIN { use_ok('Net::DNS'); }

my $size=2048;
my $ednsflags=0x9e22;


my $optrr= Net::DNS::RR->new(
			  Type         => 'OPT',
			  Name         => '',
			  Class        => $size,  # Decimal UDPpayload
			  ednsflags    => $ednsflags, # first bit set see RFC 3225
			  );
ok($optrr->do,"DO bit set");
is($optrr->clear_do,0x1e22,"Clearing do, leaving the other bits ");
ok(!$optrr->do,"DO bit cleared");
is($optrr->set_do,0x9e22,"Clearing do, leaving the other bits ");


is($optrr->size(),2048,"Size read");
is($optrr->size(1498),1498,"Size set");
