unittests: Avoid alloc log checking errors when printing tests

This commit is contained in:
ZyX
2017-10-29 01:31:31 +03:00
parent 568cf73c90
commit c202f17c8d

View File

@@ -248,16 +248,16 @@ describe('Expressions parser', function()
local hls = phl2lua(pstate) local hls = phl2lua(pstate)
if exp_ast == nil then if exp_ast == nil then
format_check(str, flags, ast, hls) format_check(str, flags, ast, hls)
return else
end eq(exp_ast, ast)
eq(exp_ast, ast) if exp_highlighting_fs then
if exp_highlighting_fs then local exp_highlighting = {}
local exp_highlighting = {} local next_col = 0
local next_col = 0 for i, h in ipairs(exp_highlighting_fs) do
for i, h in ipairs(exp_highlighting_fs) do exp_highlighting[i], next_col = h(next_col)
exp_highlighting[i], next_col = h(next_col) end
eq(exp_highlighting, hls)
end end
eq(exp_highlighting, hls)
end end
lib.viml_pexpr_free_ast(east) lib.viml_pexpr_free_ast(east)
kvi_destroy(pstate.colors) kvi_destroy(pstate.colors)