Skip to content

Commit c9494c5

Browse files
committed
add swap_xml test
1 parent cc107cb commit c9494c5

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

test/runtests.jl

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -954,7 +954,21 @@ if "stress" in ARGS
954954
end
955955
end
956956

957+
function swap_xml()
958+
@showprogress "swap_xml" for n in 1:N
959+
doc1 = parsexml("<a><b><c/></b></a>")
960+
doc2 = parsexml("<a><b><c/></b></a>")
961+
b1 = firstelement(root(doc1))
962+
b2 = firstelement(root(doc2))
963+
unlink!(b1)
964+
link!(root(doc2), b1)
965+
unlink!(b2)
966+
link!(root(doc1), b2)
967+
end
968+
end
969+
957970
parse_xml()
958971
link_xml()
959972
unlink_xml()
973+
swap_xml()
960974
end

0 commit comments

Comments
 (0)