Sha256: e9ad4219dd834f7cca6eab9d34bef90dc3a8c10f3dfda0defb889d988121a401
Contents?: true
Size: 557 Bytes
Versions: 2
Compression:
Stored size: 557 Bytes
Contents
#!/usr/bin/ruby -w -I. $FAILS = [] def test( doc, doc2, iter ) doc.root = XML::Node.new("ccc") iter.times { |i| doc.root.child_add(doc2.root) # doc.root << doc2.root.copy(true) } return doc end def test2(iter) doc = XML::Document.new('1.0') doc2 = XML::Document.new('1.0') doc2.root = XML::Node.new("aaa") ret = test( doc, doc2, iter ) li=ret.find('aaa').length $FAILS << [li,iter] unless li == iter end test2(5) 1000.times do |i| test2(i) print "\r#{i}"; $stdout.flush end puts "\n#{$FAILS.length} failures" p $FAILS
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
libxml-ruby-0.5.3 | test/ets_copy_bug2.rb |
libxml-ruby-0.5.4 | test/ets_copy_bug2.rb |