aboutsummaryrefslogtreecommitdiff
path: root/test/functional/eval/match_functions_spec.lua
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2019-09-06 18:16:57 -0700
committerGitHub <noreply@github.com>2019-09-06 18:16:57 -0700
commit158b78062e9daa65203b4591dae733dd6c11ad2c (patch)
treee6988da22f16062b57d50daeda084bcc489a6a1d /test/functional/eval/match_functions_spec.lua
parent638f2b6dee7439de303bea12dec80240617e8034 (diff)
parent7e1c9598617a140e40a0a22676c0631294617246 (diff)
downloadrneovim-158b78062e9daa65203b4591dae733dd6c11ad2c.tar.gz
rneovim-158b78062e9daa65203b4591dae733dd6c11ad2c.tar.bz2
rneovim-158b78062e9daa65203b4591dae733dd6c11ad2c.zip
Merge #10932 'test: Eliminate expect_err'
Diffstat (limited to 'test/functional/eval/match_functions_spec.lua')
-rw-r--r--test/functional/eval/match_functions_spec.lua10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/functional/eval/match_functions_spec.lua b/test/functional/eval/match_functions_spec.lua
index 0ec465a34c..f399ef47d3 100644
--- a/test/functional/eval/match_functions_spec.lua
+++ b/test/functional/eval/match_functions_spec.lua
@@ -6,7 +6,7 @@ local clear = helpers.clear
local funcs = helpers.funcs
local command = helpers.command
local exc_exec = helpers.exc_exec
-local expect_err = helpers.expect_err
+local pcall_err = helpers.pcall_err
before_each(clear)
@@ -41,11 +41,11 @@ describe('setmatches()', function()
end)
it('fails with -1 if highlight group is not defined', function()
- expect_err('E28: No such highlight group name: 1', funcs.setmatches,
- {{group=1, pattern=2, id=3, priority=4}})
+ eq('Vim:E28: No such highlight group name: 1',
+ pcall_err(funcs.setmatches, {{group=1, pattern=2, id=3, priority=4}}))
eq({}, funcs.getmatches())
- expect_err('E28: No such highlight group name: 1', funcs.setmatches,
- {{group=1, pos1={2}, pos2={6}, id=3, priority=4, conceal=5}})
+ 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())
end)
end)