Changeset 2023

Show
Ignore:
Timestamp:
10/10/06 04:29:25
Author:
miyagawa
Message:

added test for walkdown and fixed a bug

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • XML-OPML-LibXML/trunk/lib/XML/OPML/LibXML/Document.pm

    r2019 r2023  
    5555 
    5656    if ($outline->is_container) { 
    57         for my $child ($outline->getChildrenByTagName('outline')) { 
     57        for my $child ($outline->{elem}->getChildrenByLocalName('outline')) { 
    5858            $self->_walk($child, $cb); 
    5959        } 
  • XML-OPML-LibXML/trunk/t/02_nested.t

    r2017 r2023  
    1818    is $children[0]->title, 'blog.bulknews.net'; 
    1919    is $children[0]->html_url, 'http://blog.bulknews.net/mt/'; 
     20 
     21    my @title; 
     22    $doc->walkdown(sub { push @title, $_[0]->title }); 
     23 
     24    is_deeply \@title, [ qw( Subscriptions Foo blog.bulknews.net Bar Baz Bulknews::Subtech ) ]; 
    2025} 
    2126