mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
unittests: Fix tests crash
Tests crash at some point without - `after_each(collectgarbage)` right before “typval.c list copy() copies list correctly and converts items” test. - Commenting out that test. - Adding `collectgarbage()` after the test (what actually this commit does). Adding `collectgarbage()` to top-level `after_each` block right after `restore_allocators` makes running this file crash even if it is run alone.
This commit is contained in:
parent
7ceebacb3f
commit
cf45c7bb05
@ -606,6 +606,7 @@ describe('typval.c', function()
|
||||
eq(nil, lib.tv_list_copy(nil, nil, false, 1))
|
||||
end)
|
||||
itp('copies list correctly without converting items', function()
|
||||
do
|
||||
local v = {{['«']='»'}, {'„'}, 1, '“', null_string, null_list, null_dict}
|
||||
local l_tv = lua2typvalt(v)
|
||||
local l = l_tv.vval.v_list
|
||||
@ -663,6 +664,8 @@ describe('typval.c', function()
|
||||
a.li(lis_deepcopy1[6]),
|
||||
a.li(lis_deepcopy1[7]),
|
||||
})
|
||||
end
|
||||
collectgarbage()
|
||||
end)
|
||||
itp('copies list correctly and converts items', function()
|
||||
local vc = ffi.gc(ffi.new('vimconv_T[1]'), function(vc)
|
||||
|
Loading…
Reference in New Issue
Block a user