test: NULL-initialized vimscript strings should eval to empty strings

This commit is contained in:
Björn Linse 2015-02-12 18:55:13 +01:00 committed by Justin M. Keyes
parent fd636fc6dc
commit f56d1dc838

View File

@ -27,6 +27,11 @@ describe('vim_* functions', function()
nvim('command', 'let g:v2 = [1, 2, {"v3": 3}]') nvim('command', 'let g:v2 = [1, 2, {"v3": 3}]')
eq({v1 = 'a', v2 = {1, 2, {v3 = 3}}}, nvim('eval', 'g:')) eq({v1 = 'a', v2 = {1, 2, {v3 = 3}}}, nvim('eval', 'g:'))
end) end)
it('handles NULL-initialized strings correctly', function()
eq(1, nvim('eval',"matcharg(1) == ['', '']"))
eq({'', ''}, nvim('eval','matcharg(1)'))
end)
end) end)
describe('strwidth', function() describe('strwidth', function()