diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2019-09-06 17:17:37 -0700 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2019-09-06 17:19:07 -0700 |
commit | 7e1c9598617a140e40a0a22676c0631294617246 (patch) | |
tree | e6988da22f16062b57d50daeda084bcc489a6a1d /test/functional/eval/match_functions_spec.lua | |
parent | af946046b922dc5d5285a70a23d11916d8389a5d (diff) | |
download | rneovim-7e1c9598617a140e40a0a22676c0631294617246.tar.gz rneovim-7e1c9598617a140e40a0a22676c0631294617246.tar.bz2 rneovim-7e1c9598617a140e40a0a22676c0631294617246.zip |
test: Eliminate expect_err
Eliminate `expect_err` in favor of `pcall_err` + `eq` or `matches`.
Diffstat (limited to 'test/functional/eval/match_functions_spec.lua')
-rw-r--r-- | test/functional/eval/match_functions_spec.lua | 10 |
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) |