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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.7 - (hide annotations) (download) (as text)
Sun Jul 15 12:54:07 2007 UTC (17 years, 4 months ago) by wakaba
Branch: MAIN
CVS Tags: manakai-release-0-4-0, HEAD
Changes since 1.6: +10 -2 lines
File MIME type: application/x-troff
++ manakai/t/ChangeLog	15 Jul 2007 07:03:38 -0000
	* DOM-Atom-AtomElement.t: New test script.

	* DOM-DOMImplementation.t, DOM-Node.t: New test
	data for |get_feature|.

2007-07-15  Wakaba  <wakaba@suika.fam.cx>

++ manakai/lib/Message/Markup/ChangeLog	15 Jul 2007 07:53:30 -0000
2007-07-15  Wakaba  <wakaba@suika.fam.cx>

	* H2H.dis: A typo in entity name is fixed.

++ manakai/lib/Message/DOM/Atom/ChangeLog	15 Jul 2007 07:55:46 -0000
	* AtomElement.pm: Wrong module was loaded.
	(AUTOLOAD): No warnings!  Some argument index were incorrect.
	Some variables were not referenced correctly.
	(AtomDateConstruct): Package name was incorrect.

2007-07-15  Wakaba  <wakaba@suika.fam.cx>

++ manakai/lib/Message/DOM/ChangeLog	15 Jul 2007 12:53:16 -0000
	* XMLParserTemp.pm: Use |Whatpm::Charset::DecodeHandle|
	instead of |Message::Charset::Encode|.

2007-07-15  Wakaba  <wakaba@suika.fam.cx>

1 wakaba 1.1 #!/usr/bin/perl
2     use strict;
3     use Test;
4 wakaba 1.7 BEGIN { plan tests => 31 }
5 wakaba 1.1
6     require Message::DOM::DOMImplementation;
7    
8 wakaba 1.4 my $dom = Message::DOM::DOMImplementation->new;
9 wakaba 1.1
10     ok $dom->isa ('Message::DOM::DOMImplementation');
11     ok $dom->isa ('Message::IF::DOMImplementation');
12    
13     ## AUTOLOAD test
14 wakaba 1.3 {
15     ok $dom->can ('create_uri_reference') ? 1 : 0, 1, "can create_uri_reference";
16     my $uri = $dom->create_uri_reference ('http://www.uri.test/');
17     ok UNIVERSAL::isa ($uri, 'Message::IF::URIReference');
18     }
19 wakaba 1.1
20 wakaba 1.3 {
21     ok $dom->can ('create_document') ? 1 : 0, 1, "can create_document";
22     my $doc = $dom->create_document;
23     ok UNIVERSAL::isa ($doc, 'Message::IF::Document');
24     }
25 wakaba 1.2
26 wakaba 1.3 {
27     ok $dom->can ('create_document_type') ? 1 : 0, 1, "can create_document_type";
28 wakaba 1.5 my $doc = $dom->create_document_type ('dt');
29 wakaba 1.3 ok UNIVERSAL::isa ($doc, 'Message::IF::DocumentType');
30     }
31 wakaba 1.2
32 wakaba 1.1 ok $dom->can ('no_such_method') ? 1 : 0, 0;
33     my $something_called = 0;
34     eval {
35     $dom->no_such_method;
36     $something_called = 1;
37     };
38     ok $something_called, 0;
39    
40 wakaba 1.4 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 wakaba 1.6 {Traversal => '2.0'}, {Traversal => ''},
47 wakaba 1.7 {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 wakaba 1.4 ) {
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 wakaba 1.7 ## $Date: 2007/07/14 16:32:28 $

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24