aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorBjörn Linse <bjorn.linse@gmail.com>2021-08-19 15:48:22 +0200
committerGitHub <noreply@github.com>2021-08-19 15:48:22 +0200
commitd088066fa1d9a4d897890e35b5dd0cfb4e8b365b (patch)
treebefd5e74dc32c86ce8feb03ac26a3bcc05761e3f /test
parent19a0d90bb3479bb6516be229f6001646329d842f (diff)
parentbb4b4d79a8dd0eb60aa37f0b889558c4ae8e9317 (diff)
downloadrneovim-d088066fa1d9a4d897890e35b5dd0cfb4e8b365b.tar.gz
rneovim-d088066fa1d9a4d897890e35b5dd0cfb4e8b365b.tar.bz2
rneovim-d088066fa1d9a4d897890e35b5dd0cfb4e8b365b.zip
Merge pull request #15422 from bfredl/syn_name2id_go_brr
feat(highlights): some improvements and perf fixes
Diffstat (limited to 'test')
-rw-r--r--test/functional/eval/match_functions_spec.lua15
1 files changed, 7 insertions, 8 deletions
diff --git a/test/functional/eval/match_functions_spec.lua b/test/functional/eval/match_functions_spec.lua
index f399ef47d3..9f168c913a 100644
--- a/test/functional/eval/match_functions_spec.lua
+++ b/test/functional/eval/match_functions_spec.lua
@@ -6,7 +6,6 @@ local clear = helpers.clear
local funcs = helpers.funcs
local command = helpers.command
local exc_exec = helpers.exc_exec
-local pcall_err = helpers.pcall_err
before_each(clear)
@@ -40,13 +39,13 @@ describe('setmatches()', function()
}}, funcs.getmatches())
end)
- it('fails with -1 if highlight group is not defined', function()
- eq('Vim:E28: No such highlight group name: 1',
- pcall_err(funcs.setmatches, {{group=1, pattern=2, id=3, priority=4}}))
- eq({}, funcs.getmatches())
- eq('Vim:E28: No such highlight group name: 1',
- pcall_err(funcs.setmatches, {{group=1, pos1={2}, pos2={6}, id=3, priority=4, conceal=5}}))
- eq({}, funcs.getmatches())
+ it('does not fail if highlight group is not defined', function()
+ eq(0, funcs.setmatches{{group=1, pattern=2, id=3, priority=4}})
+ eq({{group='1', pattern='2', id=3, priority=4}},
+ funcs.getmatches())
+ eq(0, funcs.setmatches{{group=1, pos1={2}, pos2={6}, id=3, priority=4, conceal=5}})
+ eq({{group='1', pos1={2}, pos2={6}, id=3, priority=4, conceal='5'}},
+ funcs.getmatches())
end)
end)