aboutsummaryrefslogtreecommitdiff
path: root/test/functional/api/highlight_spec.lua
diff options
context:
space:
mode:
authorAlvaro Muñoz <alvaro@pwntester.com>2020-11-13 19:50:03 +0100
committerGitHub <noreply@github.com>2020-11-13 19:50:03 +0100
commitaaca2c1c4d07d5bb9dd297b8e21e4a66acfb8ad3 (patch)
tree861548ba31ba5d8aabfd278fa9944b165438dcfe /test/functional/api/highlight_spec.lua
parent35325ddac04b1b59b7982797021cdaabdabc87fb (diff)
downloadrneovim-aaca2c1c4d07d5bb9dd297b8e21e4a66acfb8ad3.tar.gz
rneovim-aaca2c1c4d07d5bb9dd297b8e21e4a66acfb8ad3.tar.bz2
rneovim-aaca2c1c4d07d5bb9dd297b8e21e4a66acfb8ad3.zip
feat(lua): improve error message to make it actionable (#13276)
* improve error message to make it actionable
Diffstat (limited to 'test/functional/api/highlight_spec.lua')
-rw-r--r--test/functional/api/highlight_spec.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/functional/api/highlight_spec.lua b/test/functional/api/highlight_spec.lua
index daf20c006c..058706718a 100644
--- a/test/functional/api/highlight_spec.lua
+++ b/test/functional/api/highlight_spec.lua
@@ -57,7 +57,7 @@ describe('API: highlight',function()
-- Test nil argument.
err, emsg = pcall(meths.get_hl_by_id, { nil }, false)
eq(false, err)
- eq('Wrong type for argument 1, expecting Integer',
+ eq('Wrong type for argument 1 when calling nvim_get_hl_by_id, expecting Integer',
string.match(emsg, 'Wrong.*'))
-- Test 0 argument.
@@ -112,7 +112,7 @@ describe('API: highlight',function()
-- Test nil argument.
err, emsg = pcall(meths.get_hl_by_name , { nil }, false)
eq(false, err)
- eq('Wrong type for argument 1, expecting String',
+ eq('Wrong type for argument 1 when calling nvim_get_hl_by_name, expecting String',
string.match(emsg, 'Wrong.*'))
-- Test empty string argument.