aboutsummaryrefslogtreecommitdiff
path: root/test/functional/core/spellfile_spec.lua
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2024-01-24 18:13:39 +0800
committerGitHub <noreply@github.com>2024-01-24 18:13:39 +0800
commit8c044f0862f417a525eaf319471c286a5588d493 (patch)
tree8ee5e756e7427fc175adf074e601bcf1c528bd15 /test/functional/core/spellfile_spec.lua
parent0c1119ac7581e99d970b194d969b8776255cff44 (diff)
downloadrneovim-8c044f0862f417a525eaf319471c286a5588d493.tar.gz
rneovim-8c044f0862f417a525eaf319471c286a5588d493.tar.bz2
rneovim-8c044f0862f417a525eaf319471c286a5588d493.zip
fix(spell): always accept ':' as filename char in 'spellfile' (#27172)
Follow-up to #25236
Diffstat (limited to 'test/functional/core/spellfile_spec.lua')
-rw-r--r--test/functional/core/spellfile_spec.lua11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/functional/core/spellfile_spec.lua b/test/functional/core/spellfile_spec.lua
index 7dcdfac315..57953b8f80 100644
--- a/test/functional/core/spellfile_spec.lua
+++ b/test/functional/core/spellfile_spec.lua
@@ -4,6 +4,7 @@ local eq = helpers.eq
local clear = helpers.clear
local api = helpers.api
local exc_exec = helpers.exc_exec
+local fn = helpers.fn
local rmdir = helpers.rmdir
local write_file = helpers.write_file
local mkdir = helpers.mkdir
@@ -105,4 +106,14 @@ describe('spellfile', function()
api.nvim_set_option_value('spelllang', 'en', {})
eq('Vim(set):E757: This does not look like a spell file', exc_exec('set spell'))
end)
+
+ it('can be set to a relative path', function()
+ local fname = testdir .. '/spell/spell.add'
+ api.nvim_set_option_value('spellfile', fname, {})
+ end)
+
+ it('can be set to an absolute path', function()
+ local fname = fn.fnamemodify(testdir .. '/spell/spell.add', ':p')
+ api.nvim_set_option_value('spellfile', fname, {})
+ end)
end)