File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -113,8 +113,7 @@ class TestComment < Nokogiri::TestCase
113
113
let ( :subject ) { doc . at_css ( "div#under-test" ) }
114
114
let ( :inner_div ) { doc . at_css ( "div#do-i-exist" ) }
115
115
116
- if Nokogiri . uses_libxml? && Nokogiri ::VersionInfo . instance . libxml2_using_packaged?
117
- # see patches/libxml2/0006-htmlParseComment-treat-as-if-it-closed-the-comment.patch
116
+ if Nokogiri ::VersionInfo . instance . libxml2_using_packaged? || ( Nokogiri ::VersionInfo . instance . libxml2_using_system? && Nokogiri . uses_libxml? ( ">=2.9.11" ) )
118
117
it "behaves as if the comment is normally closed" do # COMPLIANT
119
118
assert_equal 3 , subject . children . length
120
119
assert subject . children [ 0 ] . comment?
@@ -128,9 +127,7 @@ class TestComment < Nokogiri::TestCase
128
127
end
129
128
end
130
129
131
- if Nokogiri . jruby? || Nokogiri ::VersionInfo . instance . libxml2_using_system?
132
- # this behavior may change to the above in libxml v2.9.11 depending on whether
133
- # https://gitlab.gnome.org/GNOME/libxml2/-/merge_requests/82 is merged
130
+ if Nokogiri . jruby? || ( Nokogiri ::VersionInfo . instance . libxml2_using_system? && Nokogiri . uses_libxml? ( "<2.9.11" ) )
134
131
it "behaves as if the comment encompasses the inner div" do # NON-COMPLIANT
135
132
assert_equal 1 , subject . children . length
136
133
assert subject . children . first . comment?
You can’t perform that action at this time.
0 commit comments