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.lua35
1 files changed, 28 insertions, 7 deletions
diff --git a/test/functional/ui/spell_spec.lua b/test/functional/ui/spell_spec.lua
index 913f1b9bed..2c6e586665 100644
--- a/test/functional/ui/spell_spec.lua
+++ b/test/functional/ui/spell_spec.lua
@@ -4,8 +4,9 @@ local helpers = require('test.functional.helpers')(after_each)
local Screen = require('test.functional.ui.screen')
local clear = helpers.clear
local feed = helpers.feed
-local feed_command = helpers.feed_command
local insert = helpers.insert
+local uname = helpers.uname
+local command = helpers.command
describe("'spell'", function()
local screen
@@ -16,16 +17,14 @@ describe("'spell'", function()
screen:attach()
screen:set_default_attr_ids( {
[0] = {bold=true, foreground=Screen.colors.Blue},
- [1] = {special = Screen.colors.Red, undercurl = true}
+ [1] = {special = Screen.colors.Red, undercurl = true},
+ [2] = {special = Screen.colors.Blue1, undercurl = true},
})
end)
- after_each(function()
- screen:detach()
- end)
-
it('joins long lines #7937', function()
- feed_command('set spell')
+ if uname() == 'openbsd' then pending('FIXME #12104', function() end) return end
+ command('set spell')
insert([[
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
@@ -46,4 +45,26 @@ describe("'spell'", function()
|
]])
end)
+
+ it('has correct highlight at start of line', function()
+ insert([[
+ "This is some text without any spell errors. Everything",
+ "should just be black, nothing wrong here.",
+ "",
+ "This line has a sepll error. and missing caps.",
+ "And and this is the the duplication.",
+ "with missing caps here.",
+ ]])
+ command('set spell spelllang=en_nz')
+ screen:expect([[
+ "This is some text without any spell errors. Everything", |
+ "should just be black, nothing wrong here.", |
+ "", |
+ "This line has a {1:sepll} error. {2:and} missing caps.", |
+ "{1:And and} this is {1:the the} duplication.", |
+ "with missing caps here.", |
+ ^ |
+ |
+ ]])
+ end)
end)