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

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

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

revision 1.5 by wakaba, Sat Jul 7 09:11:05 2007 UTC revision 1.7 by wakaba, Sun Nov 18 11:08:43 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 => 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
# Line 156  my $html_doc = $doc->implementation->cre Line 156  my $html_doc = $doc->implementation->cre
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, '') {
# Line 168  for my $prop (qw/document_uri input_enco Line 168  for my $prop (qw/document_uri input_enco
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, '') {
# Line 275  for my $prop (qw/all_declarations_proces Line 275  for my $prop (qw/all_declarations_proces
275    my $doc2 = $doc->implementation->create_document;    my $doc2 = $doc->implementation->create_document;
276    my $doctype = $doc2->implementation->create_document_type ('dt');    my $doctype = $doc2->implementation->create_document_type ('dt');
277    my $el = $doc2->create_element_ns (undef, 'e');    my $el = $doc2->create_element_ns (undef, 'e');
278    my $comment = $doc->create_comment ('');    my $comment = $doc2->create_comment ('');
279    $doc2->append_child ($comment);    $doc2->append_child ($comment);
280    $doc2->append_child ($doctype);    $doc2->append_child ($doctype);
281    $doc2->append_child ($el);    $doc2->append_child ($el);

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

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24