diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/functional/api/vim_spec.lua | 5 | ||||
-rw-r--r-- | test/functional/shell/viml_system_spec.lua | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/test/functional/api/vim_spec.lua b/test/functional/api/vim_spec.lua index bee9c18bd8..cbdb1980f0 100644 --- a/test/functional/api/vim_spec.lua +++ b/test/functional/api/vim_spec.lua @@ -27,6 +27,11 @@ describe('vim_* functions', function() nvim('command', 'let g:v2 = [1, 2, {"v3": 3}]') eq({v1 = 'a', v2 = {1, 2, {v3 = 3}}}, nvim('eval', 'g:')) end) + + it('handles NULL-initialized strings correctly', function() + eq(1, nvim('eval',"matcharg(1) == ['', '']")) + eq({'', ''}, nvim('eval','matcharg(1)')) + end) end) describe('strwidth', function() diff --git a/test/functional/shell/viml_system_spec.lua b/test/functional/shell/viml_system_spec.lua index d24646e712..b35f070159 100644 --- a/test/functional/shell/viml_system_spec.lua +++ b/test/functional/shell/viml_system_spec.lua @@ -191,7 +191,7 @@ describe('system()', function() if xclip then describe("with a program that doesn't close stdout", function() it('will exit properly after passing input', function() - eq(nil, eval([[system('xclip -i -selection clipboard', 'clip-data')]])) + eq('', eval([[system('xclip -i -selection clipboard', 'clip-data')]])) eq('clip-data', eval([[system('xclip -o -selection clipboard')]])) end) end) |