1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-23 07:00:04 +08:00

test(list): add test for data.list api

This commit is contained in:
wsdjeg 2022-10-19 20:40:43 +08:00
parent 2b95b6dcde
commit 5b5bd049e4
2 changed files with 9 additions and 1 deletions

View File

@ -4,7 +4,7 @@ local list = {}
function list.pop(l)
return table.remove(l)
end

View File

@ -0,0 +1,8 @@
Execute ( SpaceVim lua api: data.list ):
if get(g:, 'spacevim_use_lua', 0)
let cmp = SpaceVim#api#import('vim#compatible')
lua spacevim_list = require('spacevim.api').import('data.list')
lua context = {"java", "hello world"}
AssertEqual cmp.luaeval('spacevim_list.pop(context)'), 'hello world'
endif