aboutsummaryrefslogtreecommitdiff
path: root/test/functional/core/spellfile_spec.lua
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/core/spellfile_spec.lua')
-rw-r--r--test/functional/core/spellfile_spec.lua22
1 files changed, 10 insertions, 12 deletions
diff --git a/test/functional/core/spellfile_spec.lua b/test/functional/core/spellfile_spec.lua
index e3a59085cf..60cdf88fe3 100644
--- a/test/functional/core/spellfile_spec.lua
+++ b/test/functional/core/spellfile_spec.lua
@@ -25,6 +25,7 @@ describe('spellfile', function()
local spellheader = 'VIMspell\050'
it('errors out when prefcond section is truncated', function()
meths.set_option_value('runtimepath', testdir, {})
+ -- stylua: ignore
write_file(testdir .. '/spell/en.ascii.spl',
-- ┌ Section identifier (#SN_PREFCOND)
-- │ ┌ Section flags (#SNF_REQUIRED or zero)
@@ -35,11 +36,11 @@ describe('spellfile', function()
-- │ │ ┌ Condition regex (missing!)
.. '\000\001\001')
meths.set_option_value('spelllang', 'en', {})
- eq('Vim(set):E758: Truncated spell file',
- exc_exec('set spell'))
+ eq('Vim(set):E758: Truncated spell file', exc_exec('set spell'))
end)
it('errors out when prefcond regexp contains NUL byte', function()
meths.set_option_value('runtimepath', testdir, {})
+ -- stylua: ignore
write_file(testdir .. '/spell/en.ascii.spl',
-- ┌ Section identifier (#SN_PREFCOND)
-- │ ┌ Section flags (#SNF_REQUIRED or zero)
@@ -55,11 +56,11 @@ describe('spellfile', function()
-- │ │ ┌ PREFIXTREE tree length
.. '\000\000\000\000\000\000\000\000\000\000\000\000')
meths.set_option_value('spelllang', 'en', {})
- eq('Vim(set):E759: Format error in spell file',
- exc_exec('set spell'))
+ eq('Vim(set):E759: Format error in spell file', exc_exec('set spell'))
end)
it('errors out when region contains NUL byte', function()
meths.set_option_value('runtimepath', testdir, {})
+ -- stylua: ignore
write_file(testdir .. '/spell/en.ascii.spl',
-- ┌ Section identifier (#SN_REGION)
-- │ ┌ Section flags (#SNF_REQUIRED or zero)
@@ -72,11 +73,11 @@ describe('spellfile', function()
-- │ │ ┌ PREFIXTREE tree length
.. '\000\000\000\000\000\000\000\000\000\000\000\000')
meths.set_option_value('spelllang', 'en', {})
- eq('Vim(set):E759: Format error in spell file',
- exc_exec('set spell'))
+ eq('Vim(set):E759: Format error in spell file', exc_exec('set spell'))
end)
it('errors out when SAL section contains NUL byte', function()
meths.set_option_value('runtimepath', testdir, {})
+ -- stylua: ignore
write_file(testdir .. '/spell/en.ascii.spl',
-- ┌ Section identifier (#SN_SAL)
-- │ ┌ Section flags (#SNF_REQUIRED or zero)
@@ -96,15 +97,12 @@ describe('spellfile', function()
-- │ │ ┌ PREFIXTREE tree length
.. '\000\000\000\000\000\000\000\000\000\000\000\000')
meths.set_option_value('spelllang', 'en', {})
- eq('Vim(set):E759: Format error in spell file',
- exc_exec('set spell'))
+ eq('Vim(set):E759: Format error in spell file', exc_exec('set spell'))
end)
it('errors out when spell header contains NUL bytes', function()
meths.set_option_value('runtimepath', testdir, {})
- write_file(testdir .. '/spell/en.ascii.spl',
- spellheader:sub(1, -3) .. '\000\000')
+ write_file(testdir .. '/spell/en.ascii.spl', spellheader:sub(1, -3) .. '\000\000')
meths.set_option_value('spelllang', 'en', {})
- eq('Vim(set):E757: This does not look like a spell file',
- exc_exec('set spell'))
+ eq('Vim(set):E757: This does not look like a spell file', exc_exec('set spell'))
end)
end)