Skip to content

Commit 7f7dcbe

Browse files
committed
test: make a test more portable with newer libxml2
1 parent 94a2190 commit 7f7dcbe

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test/test-html-sax-parser.lua

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
local luaunit = require("luaunit")
2+
local libxml2 = require("xmlua").libxml2
23
local xmlua = require("xmlua")
34

45
local ffi = require("ffi")
@@ -213,6 +214,12 @@ local function collect_errors(chunk)
213214
end
214215

215216
function TestHTMLSAXParser.test_error()
217+
-- This condition may be loose
218+
if tonumber(libxml2.VERSION) >= 21207 then
219+
-- This error doesn't happen with at least libxml2 2.12.7.
220+
return
221+
end
222+
216223
local expected = {
217224
{
218225
domain = ffi.C.XML_FROM_HTML,

0 commit comments

Comments
 (0)