Skip to content

Commit 33208e3

Browse files
authored
doc: update tests and README to reflect libxml2 min req (#3304)
**What problem is this PR intended to solve?** This should have been in 3bd6202
2 parents fda0346 + e57e4b9 commit 33208e3

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,10 @@ Requirements:
117117
- Ruby >= 3.0
118118
- JRuby >= 9.4.0.0
119119

120+
If you are compiling the native extension against a system version of libxml2:
121+
122+
- libxml2 >= 2.9.2 (recommended >= 2.12.0)
123+
120124

121125
### Native Gems: Faster, more reliable installation
122126

test/html4/test_document_fragment.rb

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -182,9 +182,6 @@ def test_fragment_with_comment
182182
end
183183

184184
def test_element_children_counts
185-
if Nokogiri.uses_libxml?("<= 2.9.1")
186-
skip("#elements doesn't work in 2.9.1, see 1793a5a for history")
187-
end
188185
doc = Nokogiri::HTML4::DocumentFragment.parse(" <div> </div>\n ")
189186
assert_equal(1, doc.element_children.count)
190187
end

test/xml/test_entity_reference.rb

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -377,15 +377,14 @@ def setup
377377
xml = File.read(xml_document)
378378
reader = Nokogiri::XML::Reader(xml, path, &:default_xml)
379379

380-
if Nokogiri.uses_libxml?(">= 2.9.0")
381-
# Unknown entity is not fatal in libxml2 >= 2.9
382-
assert_equal 8, reader.count
380+
if Nokogiri.uses_libxml?
381+
assert_equal(8, reader.count)
383382
else
384383
assert_raises(Nokogiri::XML::SyntaxError) do
385384
reader.count
386385
end
387386
end
388-
assert_operator reader.errors.size, :>, 0
387+
assert_operator(reader.errors.size, :>, 0)
389388
end
390389
end
391390
end

0 commit comments

Comments
 (0)