Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: update tests and README to reflect libxml2 min req #3304

Merged
merged 1 commit into from
Aug 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,10 @@ Requirements:
- Ruby >= 3.0
- JRuby >= 9.4.0.0

If you are compiling the native extension against a system version of libxml2:

- libxml2 >= 2.9.2 (recommended >= 2.12.0)


### Native Gems: Faster, more reliable installation

Expand Down
3 changes: 0 additions & 3 deletions test/html4/test_document_fragment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,6 @@ def test_fragment_with_comment
end

def test_element_children_counts
if Nokogiri.uses_libxml?("<= 2.9.1")
skip("#elements doesn't work in 2.9.1, see 1793a5a for history")
end
doc = Nokogiri::HTML4::DocumentFragment.parse(" <div> </div>\n ")
assert_equal(1, doc.element_children.count)
end
Expand Down
7 changes: 3 additions & 4 deletions test/xml/test_entity_reference.rb
Original file line number Diff line number Diff line change
Expand Up @@ -377,15 +377,14 @@ def setup
xml = File.read(xml_document)
reader = Nokogiri::XML::Reader(xml, path, &:default_xml)

if Nokogiri.uses_libxml?(">= 2.9.0")
# Unknown entity is not fatal in libxml2 >= 2.9
assert_equal 8, reader.count
if Nokogiri.uses_libxml?
assert_equal(8, reader.count)
else
assert_raises(Nokogiri::XML::SyntaxError) do
reader.count
end
end
assert_operator reader.errors.size, :>, 0
assert_operator(reader.errors.size, :>, 0)
end
end
end
Expand Down