aboutsummaryrefslogtreecommitdiff
path: root/test/functional/eval/match_functions_spec.lua
diff options
context:
space:
mode:
authorZyX <kp-pav@yandex.ru>2016-08-20 22:25:57 +0300
committerZyX <kp-pav@yandex.ru>2017-03-29 10:07:43 +0300
commit54bd2e8b731376b29c150f909c6b50103bfbb91a (patch)
treea1862a81cd83c25792d890bd4072944c8805c281 /test/functional/eval/match_functions_spec.lua
parente18a5783080f7c94f408ec5f53dedffdb69789e1 (diff)
downloadrneovim-54bd2e8b731376b29c150f909c6b50103bfbb91a.tar.gz
rneovim-54bd2e8b731376b29c150f909c6b50103bfbb91a.tar.bz2
rneovim-54bd2e8b731376b29c150f909c6b50103bfbb91a.zip
eval: Make setmatches() return -1 in case of some failures
Diffstat (limited to 'test/functional/eval/match_functions_spec.lua')
-rw-r--r--test/functional/eval/match_functions_spec.lua7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/functional/eval/match_functions_spec.lua b/test/functional/eval/match_functions_spec.lua
index df91e41475..f6bad59c66 100644
--- a/test/functional/eval/match_functions_spec.lua
+++ b/test/functional/eval/match_functions_spec.lua
@@ -36,4 +36,11 @@ describe('setmatches()', function()
conceal='5',
}}, funcs.getmatches())
end)
+
+ it('fails with -1 if highlight group is not defined', function()
+ eq(-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}}))
+ eq({}, funcs.getmatches())
+ end)
end)