~ubuntu-branches/ubuntu/trusty/libxml-libxml-perl/trusty-security

« back to all changes in this revision

Viewing changes to t/08findnodes.t

  • Committer: Package Import Robot
  • Author(s): Alessandro Ghedini
  • Date: 2012-10-16 14:10:26 UTC
  • mfrom: (1.2.26)
  • Revision ID: package-import@ubuntu.com-20121016141026-3x0th9su7cue9hl0
Tags: 2.0006+dfsg-1
* New upstream release
* Refresh patches
* Bump Standards-Version to 3.9.4 (no changes needed)

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
if ( defined $dom ) {
20
20
    # get the root document
21
21
    my $elem   = $dom->getDocumentElement();
22
 
  
 
22
 
23
23
    # first very simple path starting at root
24
24
    my @list   = $elem->findnodes( "species" );
25
25
    # TEST
35
35
    @list   = $elem->findnodes( "species[\@name='Llama']" );
36
36
    # TEST
37
37
    is( scalar( @list ), 1, ' TODO : Add test name' );
38
 
  
 
38
 
39
39
    # find with not conditions
40
40
    @list   = $elem->findnodes( "species[\@name!='Llama']/disposition" );
41
41
    # TEST
54
54
        # TEST
55
55
        is( $x->getData(), "1234", ' TODO : Add test name' );
56
56
    }
57
 
    
 
57
 
58
58
    my $telem = $dom->createElement('test');
59
59
    $telem->appendWellBalancedChunk('<b>c</b>');
60
 
  
 
60
 
61
61
    finddoc($dom);
62
62
    # TEST
63
63
    ok(1, ' TODO : Add test name');
189
189
 
190
190
    # @list = $doc->getElementsByTagName( "A" );
191
191
    # ok( scalar @list );
192
 
    # ok( $list[0]->isSameNode( $root ) );        
 
192
    # ok( $list[0]->isSameNode( $root ) );
193
193
 
194
194
    @list = $root->getElementsByTagName( 'B' );
195
195
    # TEST
212
212
    $root->appendChild( $b );
213
213
    $c= $doc->createElement( "C" );
214
214
    $b->appendChild( $c );
215
 
    
 
215
 
216
216
    my @list = $root->findnodes( "B" );
217
217
    # TEST
218
218
    is( scalar(@list) , 2, ' TODO : Add test name' );
228
228
    # findnode remove problem
229
229
 
230
230
    my $xmlstr = "<a><b><c>1</c><c>2</c></b></a>";
231
 
    
 
231
 
232
232
    my $doc       = $parser->parse_string( $xmlstr );
233
233
    my $root      = $doc->documentElement;
234
234
    my ( $lastc ) = $root->findnodes( 'b/c[last()]' );