aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui/spell_spec.lua
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/ui/spell_spec.lua')
-rw-r--r--test/functional/ui/spell_spec.lua48
1 files changed, 48 insertions, 0 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)