From c202f17c8d8cb2140aa1b21b2e2d2ab3925a7812 Mon Sep 17 00:00:00 2001 From: ZyX Date: Sun, 29 Oct 2017 01:31:31 +0300 Subject: unittests: Avoid alloc log checking errors when printing tests --- test/unit/viml/expressions/parser_spec.lua | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'test/unit/viml/expressions/parser_spec.lua') diff --git a/test/unit/viml/expressions/parser_spec.lua b/test/unit/viml/expressions/parser_spec.lua index f3d0790e68..125a658f7b 100644 --- a/test/unit/viml/expressions/parser_spec.lua +++ b/test/unit/viml/expressions/parser_spec.lua @@ -248,16 +248,16 @@ describe('Expressions parser', function() local hls = phl2lua(pstate) if exp_ast == nil then format_check(str, flags, ast, hls) - return - end - eq(exp_ast, ast) - if exp_highlighting_fs then - local exp_highlighting = {} - local next_col = 0 - for i, h in ipairs(exp_highlighting_fs) do - exp_highlighting[i], next_col = h(next_col) + else + eq(exp_ast, ast) + if exp_highlighting_fs then + local exp_highlighting = {} + local next_col = 0 + for i, h in ipairs(exp_highlighting_fs) do + exp_highlighting[i], next_col = h(next_col) + end + eq(exp_highlighting, hls) end - eq(exp_highlighting, hls) end lib.viml_pexpr_free_ast(east) kvi_destroy(pstate.colors) -- cgit