Skip to content

Commit db26a04

Browse files
committed
limit test of libxml-specific DocumentFragment#dup behavior
... to only running when testing the libxml2 impl. Related to #1846 and #1063.
1 parent 2e15c88 commit db26a04

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

test/xml/test_document_fragment.rb

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -263,11 +263,13 @@ def test_issue_1077_parsing_of_frozen_strings
263263
Nokogiri::XML::DocumentFragment.parse(input) # assert_nothing_raised
264264
end
265265

266-
def test_dup_should_exist_in_a_new_document
267-
# https://github.com/sparklemotion/nokogiri/issues/1063
268-
original = Nokogiri::XML::DocumentFragment.parse("<div><p>hello</p></div>")
269-
duplicate = original.dup
270-
assert_not_equal original.document, duplicate.document
266+
if Nokogiri.uses_libxml?
267+
def test_dup_should_exist_in_a_new_document
268+
# https://github.com/sparklemotion/nokogiri/issues/1063
269+
original = Nokogiri::XML::DocumentFragment.parse("<div><p>hello</p></div>")
270+
duplicate = original.dup
271+
assert_not_equal original.document, duplicate.document
272+
end
271273
end
272274

273275
def test_dup_should_create_an_xml_document_fragment

0 commit comments

Comments
 (0)