diff options
author | ZyX <kp-pav@yandex.ru> | 2017-10-29 01:31:31 +0300 |
---|---|---|
committer | ZyX <kp-pav@yandex.ru> | 2017-10-29 01:31:31 +0300 |
commit | c202f17c8d8cb2140aa1b21b2e2d2ab3925a7812 (patch) | |
tree | 65a5b6ce09e0432015ebc6c004849f509f8b00d3 /test/unit/viml/expressions/parser_spec.lua | |
parent | 568cf73c90af2966ee091f2180905a8cf9582064 (diff) | |
download | rneovim-c202f17c8d8cb2140aa1b21b2e2d2ab3925a7812.tar.gz rneovim-c202f17c8d8cb2140aa1b21b2e2d2ab3925a7812.tar.bz2 rneovim-c202f17c8d8cb2140aa1b21b2e2d2ab3925a7812.zip |
unittests: Avoid alloc log checking errors when printing tests
Diffstat (limited to 'test/unit/viml/expressions/parser_spec.lua')
-rw-r--r-- | test/unit/viml/expressions/parser_spec.lua | 18 |
1 files changed, 9 insertions, 9 deletions
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) |