diff options
author | zeertzjq <zeertzjq@outlook.com> | 2024-09-27 19:10:55 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-27 19:10:55 +0800 |
commit | eea6b84a87fb72d66f83e8b5c440764ccbdf69b5 (patch) | |
tree | f62e8b104fc438a7f6d327bfc32f034d2c0b37f2 /test/functional/api/window_spec.lua | |
parent | 60a75780586ee7ab001529f3d0d0d3fe17c341eb (diff) | |
download | rneovim-eea6b84a87fb72d66f83e8b5c440764ccbdf69b5.tar.gz rneovim-eea6b84a87fb72d66f83e8b5c440764ccbdf69b5.tar.bz2 rneovim-eea6b84a87fb72d66f83e8b5c440764ccbdf69b5.zip |
test(api/window_spec): remove duplicate test (#30538)
Diffstat (limited to 'test/functional/api/window_spec.lua')
-rw-r--r-- | test/functional/api/window_spec.lua | 40 |
1 files changed, 7 insertions, 33 deletions
diff --git a/test/functional/api/window_spec.lua b/test/functional/api/window_spec.lua index 046e7107c0..63cde9dfb2 100644 --- a/test/functional/api/window_spec.lua +++ b/test/functional/api/window_spec.lua @@ -2765,61 +2765,35 @@ describe('API/win', function() border = 'single', }) eq( - 'title/footer cannot be an empty array', - pcall_err(api.nvim_win_set_config, win, { title = {} }) + 'title/footer must be string or array', + pcall_err(api.nvim_win_set_config, win, { title = 0 }) ) command('redraw!') assert_alive() - end) - - it('no crash with invalid footer', function() - local win = api.nvim_open_win(0, true, { - width = 10, - height = 10, - relative = 'editor', - row = 10, - col = 10, - footer = { { 'test' } }, - border = 'single', - }) eq( 'title/footer cannot be an empty array', - pcall_err(api.nvim_win_set_config, win, { footer = {} }) + pcall_err(api.nvim_win_set_config, win, { title = {} }) ) command('redraw!') assert_alive() end) - end) - describe('set_config', function() - it('no crash with invalid title', function() + it('no crash with invalid footer', function() local win = api.nvim_open_win(0, true, { width = 10, height = 10, relative = 'editor', row = 10, col = 10, - title = { { 'test' } }, + footer = { { 'test' } }, border = 'single', }) eq( - 'title/footer cannot be an empty array', - pcall_err(api.nvim_win_set_config, win, { title = {} }) + 'title/footer must be string or array', + pcall_err(api.nvim_win_set_config, win, { footer = 0 }) ) command('redraw!') assert_alive() - end) - - it('no crash with invalid footer', function() - local win = api.nvim_open_win(0, true, { - width = 10, - height = 10, - relative = 'editor', - row = 10, - col = 10, - footer = { { 'test' } }, - border = 'single', - }) eq( 'title/footer cannot be an empty array', pcall_err(api.nvim_win_set_config, win, { footer = {} }) |