Bugs item #7537, was opened at 2007-01-02 16:53 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=7537&group_id=494
Category: None Group: None >Status: Closed >Resolution: Accepted Priority: 3 Submitted By: Nobody (None) >Assigned to: Charlie Savage (cfis) Summary: XPath Unit Test does not test XPath Initial Comment: The Unit test (tc_xml_xpath.rb) is quite lacking. It tests to see if ruby objects get created but it doesn't test to check if XPath actually works. The following code fails (segfault) with the latest libxml2 (2.6.27) and Ruby libxml (0.8.3.4) #!/usr/bin/ruby ############### require "xml/libxml" str = '<ruby_array uga="booga" foo="bar"><fixnum>one</fixnum><fixnum>two</fixnu xp = XML::Parser.string( str ) doc = xp.parse p doc.class.name xpt = doc.find('/ruby_array/fixnum').xpath p xpt.class.name set = xpt.set p set.class.name set.each{ |n| p n } # ---------------------------------------------------------------------- >Comment By: Charlie Savage (cfis) Date: 2008-07-09 02:51 Message: The tests aren't great, but are now a fair bit better. Please free to expand on them if you have time. Note the segmentation fault is fixed. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=7537&group_id=494 _______________________________________________ libxml-devel mailing list libxml-devel@rubyforge.org http://rubyforge.org/mailman/listinfo/libxml-devel