From f56d1dc838302c1cf0967724bf15a2136c37ef71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Linse?= Date: Thu, 12 Feb 2015 18:55:13 +0100 Subject: [PATCH] test: NULL-initialized vimscript strings should eval to empty strings --- test/functional/api/vim_spec.lua | 5 +++++ 1 file changed, 5 insertions(+) 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()