diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2018-05-10 19:18:58 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-10 19:18:58 +0200 |
commit | 8d40b3617c8bb10af5d4d4abcab0dfe77a4e807d (patch) | |
tree | cded38835bde85bc8a1682303617f84bf2549f7e /test/functional/eval/match_functions_spec.lua | |
parent | 1cd8517344c0d99ca6fb3246c70f78d271993cf6 (diff) | |
parent | 966e7abc4960746b4dde618807fb5516d162ae2d (diff) | |
download | rneovim-8d40b3617c8bb10af5d4d4abcab0dfe77a4e807d.tar.gz rneovim-8d40b3617c8bb10af5d4d4abcab0dfe77a4e807d.tar.bz2 rneovim-8d40b3617c8bb10af5d4d4abcab0dfe77a4e807d.zip |
Merge #8371 'API: more reliable/descriptive VimL errors'
Diffstat (limited to 'test/functional/eval/match_functions_spec.lua')
-rw-r--r-- | test/functional/eval/match_functions_spec.lua | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/test/functional/eval/match_functions_spec.lua b/test/functional/eval/match_functions_spec.lua index 7989b22b5e..0ec465a34c 100644 --- a/test/functional/eval/match_functions_spec.lua +++ b/test/functional/eval/match_functions_spec.lua @@ -6,6 +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 before_each(clear) @@ -40,9 +41,11 @@ describe('setmatches()', function() end) it('fails with -1 if highlight group is not defined', function() - eq(-1, funcs.setmatches({{group=1, pattern=2, id=3, priority=4}})) + expect_err('E28: No such highlight group name: 1', funcs.setmatches, + {{group=1, pattern=2, id=3, priority=4}}) eq({}, funcs.getmatches()) - eq(-1, funcs.setmatches({{group=1, pos1={2}, pos2={6}, id=3, priority=4, conceal=5}})) + expect_err('E28: No such highlight group name: 1', funcs.setmatches, + {{group=1, pos1={2}, pos2={6}, id=3, priority=4, conceal=5}}) eq({}, funcs.getmatches()) end) end) |