/[suikacvs]/messaging/manakai/t/DOM-DOMImplementation.t
Suika

Diff of /messaging/manakai/t/DOM-DOMImplementation.t

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by wakaba, Sun Jun 17 13:37:42 2007 UTC revision 1.7 by wakaba, Sun Jul 15 12:54:07 2007 UTC
# Line 1  Line 1 
1  #!/usr/bin/perl  #!/usr/bin/perl
2  use strict;  use strict;
3  use Test;  use Test;
4  BEGIN { plan tests => 10 }  BEGIN { plan tests => 31 }
5    
6  require Message::DOM::DOMImplementation;  require Message::DOM::DOMImplementation;
7    
8  my $dom = Message::DOM::DOMImplementation->____new;  my $dom = Message::DOM::DOMImplementation->new;
9    
10  ok $dom->isa ('Message::DOM::DOMImplementation');  ok $dom->isa ('Message::DOM::DOMImplementation');
11  ok $dom->isa ('Message::IF::DOMImplementation');  ok $dom->isa ('Message::IF::DOMImplementation');
# Line 25  ok $dom->isa ('Message::IF::DOMImplement Line 25  ok $dom->isa ('Message::IF::DOMImplement
25    
26  {  {
27    ok $dom->can ('create_document_type') ? 1 : 0, 1, "can create_document_type";    ok $dom->can ('create_document_type') ? 1 : 0, 1, "can create_document_type";
28    my $doc = $dom->create_document_type;    my $doc = $dom->create_document_type ('dt');
29    ok UNIVERSAL::isa ($doc, 'Message::IF::DocumentType');    ok UNIVERSAL::isa ($doc, 'Message::IF::DocumentType');
30  }  }
31    
# Line 37  eval { Line 37  eval {
37  };  };
38  ok $something_called, 0;  ok $something_called, 0;
39    
40  ## License: Public Domain.  require Message::DOM::DOMImplementationRegistry;
41    F: for my $features (
42      {Core => '1.0'}, {XML => '1.0'}, {Core => '1.0', XML => '1.0'},
43      {Core => '2.0'}, {XML => '2.0'}, {Core => '2.0', XML => '2.0'},
44      {Core => '3.0'}, {XML => '3.0'}, {Core => '3.0', XML => '3.0'},
45      {XMLVersion => '1.0'}, {XMLVersion => '1.1'},
46      {Traversal => '2.0'}, {Traversal => ''},
47      {q<http://suika.fam.cx/www/2006/feature/XDoctype> => '3.0'},
48      {q<http://suika.fam.cx/www/2006/feature/XDoctype> => ''},
49      {q<http://suika.fam.cx/www/2006/feature/Atom> => '1.0'},
50      {q<http://suika.fam.cx/www/2006/feature/Atom> => ''},
51      {XML => '3.0', q<http://suika.fam.cx/www/2006/feature/Atom> => '1.0'},
52      {Core => '3.0', q<http://suika.fam.cx/www/2006/feature/Atom> => ''},
53      {q<http://suika.fam.cx/www/2006/feature/AtomThreading> => '1.0'},
54      {q<http://suika.fam.cx/www/2006/feature/AtomThreading> => ''},
55    ) {
56      my $list = $Message::DOM::DOMImplementationRegistry
57          ->get_dom_implementation_list ($features);
58      for my $impl (@$list) {
59        if ($impl->isa ('Message::DOM::DOMImplementation')) {
60          ok 1, 1, 'features: '. join ',', %$features;
61          next F;
62        }
63      }
64    } # F
65    
66    =head1 LICENSE
67    
68    Copyright 2007 Wakaba <w@suika.fam.cx>
69    
70    This program is free software; you can redistribute it and/or
71    modify it under the same terms as Perl itself.
72    
73    =cut
74    
75  ## $Date$  ## $Date$

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.7

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24