aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/functional/ui/spell_spec.lua48
-rw-r--r--test/old/testdir/gen_opt_test.vim1
2 files changed, 48 insertions, 1 deletions
diff --git a/test/functional/ui/spell_spec.lua b/test/functional/ui/spell_spec.lua
index f0fa47ebfb..c3e01e5b6a 100644
--- a/test/functional/ui/spell_spec.lua
+++ b/test/functional/ui/spell_spec.lua
@@ -408,4 +408,52 @@ describe("'spell'", function()
{5:-- VISUAL LINE --} |
]])
end)
+
+ it("global value works properly for 'spelloptions'", function()
+ screen:try_resize(43, 3)
+ exec('set spell')
+ -- :setglobal applies to future buffers but not current buffer
+ exec('setglobal spelloptions=camel')
+ insert('Here is TheCamelWord being spellchecked')
+ screen:expect([[
+ Here is {1:TheCamelWord} being spellchecke^d |
+ {0:~ }|
+ |
+ ]])
+ exec('enew')
+ insert('There is TheCamelWord being spellchecked')
+ screen:expect([[
+ There is TheCamelWord being spellchecke^d |
+ {0:~ }|
+ |
+ ]])
+ -- :setlocal applies to current buffer but not future buffers
+ exec('setlocal spelloptions=')
+ screen:expect([[
+ There is {1:TheCamelWord} being spellchecke^d |
+ {0:~ }|
+ |
+ ]])
+ exec('enew')
+ insert('What is TheCamelWord being spellchecked')
+ screen:expect([[
+ What is TheCamelWord being spellchecke^d |
+ {0:~ }|
+ |
+ ]])
+ -- :set applies to both current buffer and future buffers
+ exec('set spelloptions=')
+ screen:expect([[
+ What is {1:TheCamelWord} being spellchecke^d |
+ {0:~ }|
+ |
+ ]])
+ exec('enew')
+ insert('Where is TheCamelWord being spellchecked')
+ screen:expect([[
+ Where is {1:TheCamelWord} being spellchecke^d |
+ {0:~ }|
+ |
+ ]])
+ end)
end)
diff --git a/test/old/testdir/gen_opt_test.vim b/test/old/testdir/gen_opt_test.vim
index 85f5e33dcf..27e709b19d 100644
--- a/test/old/testdir/gen_opt_test.vim
+++ b/test/old/testdir/gen_opt_test.vim
@@ -56,7 +56,6 @@ let skip_setglobal_reasons = #{
\ shiftwidth: 'TODO: fix missing error handling for setglobal',
\ sidescrolloff: 'TODO: fix missing error handling for setglobal',
\ signcolumn: 'TODO(nvim): fix missing error handling for setglobal',
- \ spelloptions: 'TODO(nvim): fix missing error handling for setglobal',
\ tabstop: 'TODO: fix missing error handling for setglobal',
\ termwinkey: 'TODO: fix missing error handling for setglobal',
\ termwinsize: 'TODO: fix missing error handling for setglobal',