Show
Ignore:
Timestamp:
08/28/08 10:21:05 (4 months ago)
Author:
miyagawa
Message:

fix a bug when findnodes() return null node.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lang/perl/RPC-XML-Parser-LibXML/trunk/t/RPC-XML-Parser-LibXML.t

    r9112 r18369  
    66# change 'tests => 1' to 'tests => last_test_to_print'; 
    77 
    8 use Test::More tests => 21; 
     8use Test::More tests => 24; 
    99BEGIN { use_ok('RPC::XML::Parser::LibXML') }; 
    1010 
     
    376376  'Windows Live Write style newlines'; 
    377377 
    378  
    379  
     378my $r = eval { RPC::XML::Parser::LibXML::parse_rpc_xml(<<XML); 
     379<?xml version="1.0" encoding="UTF-8"?> 
     380<methodCall> 
     381<methodName>metaWeblog.newPost</methodName><params> 
     382<param><value><string>testf</string></value></param> 
     383<param><value><string>USERNAME</string></value></param><param><value><string>PASSWORD</string></value></param> 
     384<param><value><struct><member><name>title</name><value>tyuyur</value></member><member><name>description</name><value>&lt;a href=&quot;http://example.com/.a/6a00d83453919f69e200ddx53f5f4178833-pi&quot;&gt;&lt;img src = &quot;http://tsdavis.typepad.com/.a/6a00d83453919f69e200e553f5f4178833-pi&quot; align = &quot;left&quot; height=&quot;384&quot; width=&quot;212&quot; hspace = &quot;20&quot; /&gt;&lt;/a&gt;</value></member></struct></value></param> 
     385<param><value><boolean>1</boolean></value></param></params> 
     386</methodCall> 
     387XML 
     388}; 
     389 
     390ok !$@; 
     391is $r->{name}, 'metaWeblog.newPost'; 
     392is @{ $r->{args} }, 5; 
     393 
     394