1 |
#!/usr/bin/perl |
2 |
use strict; |
3 |
use Test; |
4 |
BEGIN { plan tests => 24 } |
5 |
|
6 |
require Message::DOM::DOMImplementationSource; |
7 |
|
8 |
my $source = 'Message::DOM::DOMImplementationSource'; |
9 |
|
10 |
for ( |
11 |
[undef, 1, 'undef'], |
12 |
['', 1, 'empty'], |
13 |
[{core => '3.0'}, 1, '{core=>3.0}'], |
14 |
[{Core => '3.0'}, 1, '{Core=>3.0}'], |
15 |
[{Core => ''}, 1, '{Core=>}'], |
16 |
[{Core => undef}, 1, '{Core=>undef}'], |
17 |
[{Core => ['3.0']}, 1, '{Core=>[3.0]}'], |
18 |
['Core 3.0', 1, 'Core 3.0'], |
19 |
[{Core => '3.0', xml => '3.0'}, 1, '{Core=>3.0,xml=>3.0}'], |
20 |
['Core 3.0 XML 3.0', 1, 'Core 3.0 XML 3.0'], |
21 |
['Core 3.0 XML', 1, 'Core 3.0 XML'], |
22 |
['no-such-feature', 0, 'no-such-feature'], |
23 |
) { |
24 |
my $dom = $source->get_dom_implementation ($_->[0]); |
25 |
ok defined $dom ? 1 : 0, $_->[1], 'get ' . $_->[2]; |
26 |
my $list = $source->get_dom_implementation_list ($_->[0]); |
27 |
ok 0+@$list, $_->[1] ? 1 : 0, 'get list ' . $_->[2]; |
28 |
} |
29 |
|
30 |
=head1 LICENSE |
31 |
|
32 |
Copyright 2007 Wakaba <w@suika.fam.cx> |
33 |
|
34 |
This program is free software; you can redistribute it and/or |
35 |
modify it under the same terms as Perl itself. |
36 |
|
37 |
=cut |
38 |
|
39 |
## $Date: 2007/06/17 13:37:42 $ |