diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-09-22 09:43:37 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-22 09:43:37 +0800 |
commit | 71e70d0c9919f1ab25fe3940b32ce549f49b30e8 (patch) | |
tree | 053adb63c08c449cbe3bcf82a9c2eea5b562f10b /test/functional | |
parent | b4b05f160dbb6b9b945c173b7e910b0e4c1a8b01 (diff) | |
download | rneovim-71e70d0c9919f1ab25fe3940b32ce549f49b30e8.tar.gz rneovim-71e70d0c9919f1ab25fe3940b32ce549f49b30e8.tar.bz2 rneovim-71e70d0c9919f1ab25fe3940b32ce549f49b30e8.zip |
vim-patch:9.0.0537: the do_set() function is much too long (#20274)
Problem: The do_set() function is much too long.
Solution: Move setting of a string option to a separate function.
https://github.com/vim/vim/commit/4740394f230dda09d6e9337465305741d8ee4fa3
Cherry-pick some tests from Vim patch 8.2.0540.
Diffstat (limited to 'test/functional')
-rw-r--r-- | test/functional/shada/shada_spec.lua | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/functional/shada/shada_spec.lua b/test/functional/shada/shada_spec.lua index d10a2facbb..f5a81eb2ef 100644 --- a/test/functional/shada/shada_spec.lua +++ b/test/functional/shada/shada_spec.lua @@ -238,6 +238,15 @@ describe('ShaDa support code', function() eq('', meths.get_option('shada')) end) + it('setting &shada gives proper error message on missing number', function() + eq([[Vim(set):E526: Missing number after <">: shada="]], + exc_exec([[set shada=\"]])) + for _, c in ipairs({"'", "/", ":", "<", "@", "s"}) do + eq(([[Vim(set):E526: Missing number after <%s>: shada=%s]]):format(c, c), + exc_exec(([[set shada=%s]]):format(c))) + end + end) + it('does not crash when ShaDa file directory is not writable', function() if helpers.pending_win32(pending) then return end |