test: add json_encode test for vim.empty_dict()

This commit is contained in:
Hirokazu Hata 2020-02-12 20:51:15 +09:00
parent 68de6b17b8
commit 032ede0203
No known key found for this signature in database
GPG Key ID: 9AA9860369AE0DE2
1 changed files with 2 additions and 0 deletions

View File

@ -545,6 +545,8 @@ describe('lua stdlib', function()
]]))
eq("{ {}, vim.empty_dict() }", exec_lua("return vim.inspect({{}, vim.empty_dict()})"))
eq('{}', exec_lua([[ return vim.fn.json_encode(vim.empty_dict()) ]]))
eq('{"a": {}, "b": []}', exec_lua([[ return vim.fn.json_encode({a=vim.empty_dict(), b={}}) ]]))
end)
it('vim.validate', function()