aboutsummaryrefslogtreecommitdiff
path: root/test/functional/api
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/api')
-rw-r--r--test/functional/api/vim_spec.lua5
-rw-r--r--test/functional/api/window_spec.lua2
2 files changed, 7 insertions, 0 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/api/window_spec.lua b/test/functional/api/window_spec.lua
index f3ac90de21..456252522d 100644
--- a/test/functional/api/window_spec.lua
+++ b/test/functional/api/window_spec.lua
@@ -4,6 +4,7 @@ local clear, nvim, buffer, curbuf, curbuf_contents, window, curwin, eq, neq,
ok, feed, rawfeed, insert, eval = helpers.clear, helpers.nvim, helpers.buffer, helpers.curbuf,
helpers.curbuf_contents, helpers.window, helpers.curwin, helpers.eq,
helpers.neq, helpers.ok, helpers.feed, helpers.rawfeed, helpers.insert, helpers.eval
+local wait = helpers.wait
-- check if str is visible at the beginning of some line
local function is_visible(str)
@@ -55,6 +56,7 @@ describe('window_* functions', function()
insert("epilogue")
win = curwin()
feed('gg')
+ wait() -- let nvim process the 'gg' command
-- cursor position is at beginning
eq({1, 0}, window('get_cursor', win))