1 |
#!/usr/bin/perl |
#!/usr/bin/perl |
2 |
use strict; |
use strict; |
3 |
use Test; |
use Test; |
4 |
BEGIN { plan tests => 128 } |
BEGIN { plan tests => 139 } |
5 |
|
|
6 |
require Message::DOM::DOMImplementation; |
require Message::DOM::DOMImplementation; |
7 |
use Message::Util::Error; |
use Message::Util::Error; |
8 |
|
|
9 |
## TODO: |create_document| tests |
## TODO: |create_document| tests |
10 |
|
|
11 |
my $dom = Message::DOM::DOMImplementation->____new; |
my $dom = Message::DOM::DOMImplementation->new; |
12 |
my $doc = $dom->create_document; |
my $doc = $dom->create_document; |
13 |
|
|
14 |
## AUTOLOAD test |
## AUTOLOAD test |
156 |
$doc->strict_error_checking (1); |
$doc->strict_error_checking (1); |
157 |
} |
} |
158 |
|
|
159 |
for my $prop (qw/document_uri input_encoding/) { |
for my $prop (qw/document_uri input_encoding manakai_charset/) { |
160 |
ok $doc->can ($prop) ? 1 : 0, 1, 'can ' . $prop; |
ok $doc->can ($prop) ? 1 : 0, 1, 'can ' . $prop; |
161 |
|
|
162 |
for ('http://absuri.test/', 'reluri', 0, '') { |
for ('http://absuri.test/', 'reluri', 0, '') { |
168 |
ok $doc->$prop, undef, $prop . ' undef'; |
ok $doc->$prop, undef, $prop . ' undef'; |
169 |
} |
} |
170 |
|
|
171 |
for my $prop (qw/all_declarations_processed/) { |
for my $prop (qw/all_declarations_processed manakai_has_bom/) { |
172 |
ok $doc->can ($prop) ? 1 : 0, 1, 'can ' . $prop; |
ok $doc->can ($prop) ? 1 : 0, 1, 'can ' . $prop; |
173 |
|
|
174 |
for (1, 0, '') { |
for (1, 0, '') { |