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:
parent
2b95b6dcde
commit
5b5bd049e4
@ -4,7 +4,7 @@ local list = {}
|
||||
|
||||
|
||||
function list.pop(l)
|
||||
|
||||
return table.remove(l)
|
||||
end
|
||||
|
||||
|
||||
|
8
test/lua/api/data/list.vader
Normal file
8
test/lua/api/data/list.vader
Normal 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
|
||||
|
Loading…
Reference in New Issue
Block a user