Sha256: ffab6c80450cec296066420175fa35980e0b3f4beca4c01ff1bf064b28c64377
Contents?: true
Size: 902 Bytes
Versions: 26
Compression:
Stored size: 902 Bytes
Contents
# encoding: UTF-8 require_relative './test_helper' # see mailing list archive # [libxml-devel] Segmentation fault when add the cloned/copied node # 2007/11/27 20:51 class TestNodeCopy < Minitest::Test def setup str = <<-STR <html><body> <div class="textarea" id="t1" style="STATIC">foo</div> <div class="textarea" id="t2" style="STATIC">bar</div> </body></html> STR doc = LibXML::XML::Parser.string(str).parse xpath = "//div" @div1 = doc.find(xpath).to_a[0] @div2 = doc.find(xpath).to_a[1] end def test_libxml_node_copy_not_segv @div2.each do |child| c = child.copy(false) @div1 << c end assert @div1.to_s =~ /foo/ end def test_libxml_node_clone_not_segv @div2.each do |child| c = child.clone @div1 << c end assert @div1.to_s =~ /foo/ end end
Version data entries
26 entries across 26 versions & 1 rubygems