diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-06-07 09:00:55 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-07 09:00:55 +0800 |
commit | 0e0a166a0cc5a2dc199136e313e58c27bfb91977 (patch) | |
tree | fe2c40eb718953905ad00c5e931b665d39e9ba35 /test/functional/api/vim_spec.lua | |
parent | b3d5138fd0066fda26ef7724a542ae45eb42fc84 (diff) | |
download | rneovim-0e0a166a0cc5a2dc199136e313e58c27bfb91977.tar.gz rneovim-0e0a166a0cc5a2dc199136e313e58c27bfb91977.tar.bz2 rneovim-0e0a166a0cc5a2dc199136e313e58c27bfb91977.zip |
refactor(api): adjust errors for setting options (#23942)
Diffstat (limited to 'test/functional/api/vim_spec.lua')
-rw-r--r-- | test/functional/api/vim_spec.lua | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/test/functional/api/vim_spec.lua b/test/functional/api/vim_spec.lua index 040c26e058..98e5482218 100644 --- a/test/functional/api/vim_spec.lua +++ b/test/functional/api/vim_spec.lua @@ -1435,8 +1435,12 @@ describe('API', function() pcall_err(nvim, 'set_option_value', 'scrolloff', 1, {scope = 'bogus'})) eq("Invalid 'scope': expected String, got Integer", pcall_err(nvim, 'get_option_value', 'scrolloff', {scope = 42})) - eq("Invalid 'scrolloff': expected Integer/Boolean/String, got Array", + eq("Invalid 'value': expected Integer/Boolean/String, got Array", pcall_err(nvim, 'set_option_value', 'scrolloff', {}, {})) + eq("Invalid value for option 'scrolloff': expected Number, got Boolean true", + pcall_err(nvim, 'set_option_value', 'scrolloff', true, {})) + eq("Invalid value for option 'scrolloff': expected Number, got String \"wrong\"", + pcall_err(nvim, 'set_option_value', 'scrolloff', 'wrong', {})) end) it('can get local values when global value is set', function() |