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

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

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

revision 1.1 by wakaba, Sun Jul 8 11:28:45 2007 UTC revision 1.2 by wakaba, Sat Jul 14 10:28:52 2007 UTC
# Line 92  my $doc = $dom->create_document; Line 92  my $doc = $dom->create_document;
92    ok $text4->whole_text, 'text1text3text4', 'whole_text [17]';    ok $text4->whole_text, 'text1text3text4', 'whole_text [17]';
93  }  }
94    
95    ## |CDATASection| |splitText|
96    {
97      my $node = $doc->create_cdata_section ('abcdefg');
98    
99      my $return = $node->split_text (3);
100      
101      ok $node->node_value, 'abc', 'split_text A [1]';
102      ok $return->node_type, 4, 'split_text B.node_type [1]';
103      ok $return->node_value, 'defg', 'split_text B [1]';
104      ok $return->parent_node, undef, 'split_text B.parent_node [1]';
105    
106      $node->node_value ('abcdefg');
107      my $el = $doc->create_element ('e');
108      $el->append_child ($node);
109    
110      $return = $node->split_text (3);
111    
112      ok $node->node_value, 'abc', 'split_text A [2]';
113      ok $return->node_type, 4, 'split_text B.node_type [2]';
114      ok $return->node_value, 'defg', 'split_text B [2]';
115      ok $return->parent_node, $el, 'split_text B.parent_node [2]';
116      ok $return->previous_sibling, $node, 'split_text B.ps [2]';
117    }
118    
119  =head1 LICENSE  =head1 LICENSE
120    
121  Copyright 2007 Wakaba <w@suika.fam.cx>  Copyright 2007 Wakaba <w@suika.fam.cx>

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24