diff options
Diffstat (limited to 'test/functional/api')
-rw-r--r-- | test/functional/api/command_spec.lua | 13 | ||||
-rw-r--r-- | test/functional/api/vim_spec.lua | 61 |
2 files changed, 46 insertions, 28 deletions
diff --git a/test/functional/api/command_spec.lua b/test/functional/api/command_spec.lua index a9ec2b6541..7eb7ee73f9 100644 --- a/test/functional/api/command_spec.lua +++ b/test/functional/api/command_spec.lua @@ -136,6 +136,7 @@ describe('nvim_create_user_command', function() silent = false, split = "", tab = 0, + unsilent = false, verbose = -1, vertical = false, }, @@ -170,6 +171,7 @@ describe('nvim_create_user_command', function() silent = false, split = "", tab = 0, + unsilent = false, verbose = -1, vertical = false, }, @@ -204,6 +206,7 @@ describe('nvim_create_user_command', function() silent = false, split = "", tab = 0, + unsilent = false, verbose = -1, vertical = false, }, @@ -221,10 +224,10 @@ describe('nvim_create_user_command', function() bang = true, line1 = 10, line2 = 10, - mods = "botright", + mods = "confirm unsilent botright", smods = { browse = false, - confirm = false, + confirm = true, emsg_silent = false, hide = false, keepalt = false, @@ -238,6 +241,7 @@ describe('nvim_create_user_command', function() silent = false, split = "botright", tab = 0, + unsilent = true, verbose = -1, vertical = false, }, @@ -245,7 +249,7 @@ describe('nvim_create_user_command', function() count = 10, reg = "", }, exec_lua [=[ - vim.api.nvim_command('botright 10CommandWithLuaCallback! h\tey ') + vim.api.nvim_command('unsilent botright confirm 10CommandWithLuaCallback! h\tey ') return result ]=]) @@ -272,6 +276,7 @@ describe('nvim_create_user_command', function() silent = false, split = "", tab = 0, + unsilent = false, verbose = -1, vertical = false, }, @@ -306,6 +311,7 @@ describe('nvim_create_user_command', function() silent = false, split = "", tab = 0, + unsilent = false, verbose = -1, vertical = false, }, @@ -352,6 +358,7 @@ describe('nvim_create_user_command', function() silent = false, split = "", tab = 0, + unsilent = false, verbose = -1, vertical = false, }, diff --git a/test/functional/api/vim_spec.lua b/test/functional/api/vim_spec.lua index 002bcd92a4..989ed27e16 100644 --- a/test/functional/api/vim_spec.lua +++ b/test/functional/api/vim_spec.lua @@ -3181,10 +3181,11 @@ describe('API', function() noswapfile = false, sandbox = false, silent = false, - vertical = false, split = "", tab = 0, - verbose = -1 + unsilent = false, + verbose = -1, + vertical = false, } }, meths.parse_cmd('echo foo', {})) end) @@ -3221,10 +3222,11 @@ describe('API', function() noswapfile = false, sandbox = false, silent = false, - vertical = false, split = "", tab = 0, - verbose = -1 + unsilent = false, + verbose = -1, + vertical = false, } }, meths.parse_cmd('4,6s/math.random/math.max/', {})) end) @@ -3261,10 +3263,11 @@ describe('API', function() noswapfile = false, sandbox = false, silent = false, - vertical = false, split = "", tab = 0, - verbose = -1 + unsilent = false, + verbose = -1, + vertical = false, } }, meths.parse_cmd('buffer 1', {})) end) @@ -3301,10 +3304,11 @@ describe('API', function() noswapfile = false, sandbox = false, silent = false, - vertical = false, split = "", tab = 0, - verbose = -1 + unsilent = false, + verbose = -1, + vertical = false, } }, meths.parse_cmd('put +', {})) end) @@ -3341,10 +3345,11 @@ describe('API', function() noswapfile = false, sandbox = false, silent = false, - vertical = false, split = "", tab = 0, - verbose = -1 + unsilent = false, + verbose = -1, + vertical = false, } }, meths.parse_cmd('1,3delete * 5', {})) end) @@ -3381,10 +3386,11 @@ describe('API', function() noswapfile = false, sandbox = false, silent = false, - vertical = false, split = "", tab = 0, - verbose = -1 + unsilent = false, + verbose = -1, + vertical = false, }, }, meths.parse_cmd('w!', {})) end) @@ -3421,10 +3427,11 @@ describe('API', function() noswapfile = false, sandbox = false, silent = true, - vertical = false, split = "topleft", tab = 2, - verbose = 15 + unsilent = false, + verbose = 15, + vertical = false, }, }, meths.parse_cmd('15verbose silent! aboveleft topleft tab filter /foo/ split foo.txt', {})) eq({ @@ -3443,7 +3450,7 @@ describe('API', function() nextcmd = '', mods = { browse = false, - confirm = false, + confirm = true, emsg_silent = false, filter = { pattern = "foo", @@ -3459,12 +3466,13 @@ describe('API', function() noswapfile = false, sandbox = false, silent = false, - vertical = false, - split = "", + split = "botright", tab = 0, - verbose = -1 + unsilent = true, + verbose = 0, + vertical = false, }, - }, meths.parse_cmd('filter! /foo/ split foo.txt', {})) + }, meths.parse_cmd('0verbose unsilent botright confirm filter! /foo/ split foo.txt', {})) end) it('works with user commands', function() command('command -bang -nargs=+ -range -addr=lines MyCommand echo foo') @@ -3500,10 +3508,11 @@ describe('API', function() noswapfile = false, sandbox = false, silent = false, - vertical = false, split = "", tab = 0, - verbose = -1 + unsilent = false, + verbose = -1, + vertical = false, } }, meths.parse_cmd('4,6MyCommand! test it', {})) end) @@ -3540,10 +3549,11 @@ describe('API', function() noswapfile = false, sandbox = false, silent = false, - vertical = false, split = "", tab = 0, - verbose = -1 + unsilent = false, + verbose = -1, + vertical = false, } }, meths.parse_cmd('argadd a.txt | argadd b.txt', {})) end) @@ -3581,10 +3591,11 @@ describe('API', function() noswapfile = false, sandbox = false, silent = false, - vertical = false, split = "", tab = 0, - verbose = -1 + unsilent = false, + verbose = -1, + vertical = false, } }, meths.parse_cmd('MyCommand test it', {})) end) |