diff options
author | Josh Rahm <rahm@google.com> | 2022-08-19 12:26:08 -0600 |
---|---|---|
committer | Josh Rahm <rahm@google.com> | 2022-08-19 13:06:41 -0600 |
commit | a7237662f96933efe29eed8212464571e3778cd0 (patch) | |
tree | 27930202726b4251437c8cfa53069f65b4db90dc /test/functional/api | |
parent | 02292344929069ea63c0bb872cc22d552d86b67f (diff) | |
parent | b2f979b30beac67906b2dd717fcb6a34f46f5e54 (diff) | |
download | rneovim-tmp.tar.gz rneovim-tmp.tar.bz2 rneovim-tmp.zip |
Merge branch 'master' of https://github.com/neovim/neovim into rahmtmp
Diffstat (limited to 'test/functional/api')
-rw-r--r-- | test/functional/api/highlight_spec.lua | 2 | ||||
-rw-r--r-- | test/functional/api/vim_spec.lua | 55 |
2 files changed, 53 insertions, 4 deletions
diff --git a/test/functional/api/highlight_spec.lua b/test/functional/api/highlight_spec.lua index c4197f0b3e..2730f7e23d 100644 --- a/test/functional/api/highlight_spec.lua +++ b/test/functional/api/highlight_spec.lua @@ -243,7 +243,7 @@ describe("API: set highlight", function() local function get_ns() local ns = meths.create_namespace('Test_set_hl') - meths._set_hl_ns(ns) + meths.set_hl_ns(ns) return ns end diff --git a/test/functional/api/vim_spec.lua b/test/functional/api/vim_spec.lua index fe623ff824..72a03c409a 100644 --- a/test/functional/api/vim_spec.lua +++ b/test/functional/api/vim_spec.lua @@ -281,8 +281,8 @@ describe('API', function() ]]} end) - it('does\'t display messages when output=true', function() - local screen = Screen.new(40, 8) + it('doesn\'t display messages when output=true', function() + local screen = Screen.new(40, 6) screen:attach() screen:set_default_attr_ids({ [0] = {bold=true, foreground=Screen.colors.Blue}, @@ -294,9 +294,21 @@ describe('API', function() {0:~ }| {0:~ }| {0:~ }| + | + ]]} + exec([[ + func Print() + call nvim_exec('echo "hello"', v:true) + endfunc + ]]) + feed([[:echon 1 | call Print() | echon 5<CR>]]) + screen:expect{grid=[[ + ^ | {0:~ }| {0:~ }| - | + {0:~ }| + {0:~ }| + 15 | ]]} end) end) @@ -3829,5 +3841,42 @@ describe('API', function() eq({'aa'}, meths.buf_get_lines(0, 0, 1, false)) assert_alive() end) + it("'make' command works when argument count isn't 1 #19696", function() + command('set makeprg=echo') + meths.cmd({ cmd = 'make' }, {}) + assert_alive() + meths.cmd({ cmd = 'make', args = { 'foo', 'bar' } }, {}) + assert_alive() + end) + it('doesn\'t display messages when output=true', function() + local screen = Screen.new(40, 6) + screen:attach() + screen:set_default_attr_ids({ + [0] = {bold=true, foreground=Screen.colors.Blue}, + }) + meths.cmd({cmd = 'echo', args = {[['hello']]}}, {output = true}) + screen:expect{grid=[[ + ^ | + {0:~ }| + {0:~ }| + {0:~ }| + {0:~ }| + | + ]]} + exec([[ + func Print() + call nvim_cmd(#{cmd: 'echo', args: ['"hello"']}, #{output: v:true}) + endfunc + ]]) + feed([[:echon 1 | call Print() | echon 5<CR>]]) + screen:expect{grid=[[ + ^ | + {0:~ }| + {0:~ }| + {0:~ }| + {0:~ }| + 15 | + ]]} + end) end) end) |