aboutsummaryrefslogtreecommitdiff
path: root/test/functional/helpers.lua
diff options
context:
space:
mode:
authorMatthieu Coudron <mattator@gmail.com>2018-11-09 23:52:57 +0900
committerJames McCoy <jamessan@jamessan.com>2019-12-03 23:51:30 -0500
commit4598e489c797dd3e287b51711ac1924cf6bded1f (patch)
treeb72e78fcfc401a80fc11208ffb0b723c14faec39 /test/functional/helpers.lua
parentb1e4ec1c2a08981683b2355715a421c0bfb64644 (diff)
downloadrneovim-4598e489c797dd3e287b51711ac1924cf6bded1f.tar.gz
rneovim-4598e489c797dd3e287b51711ac1924cf6bded1f.tar.bz2
rneovim-4598e489c797dd3e287b51711ac1924cf6bded1f.zip
test: always pass a string to expect_msg_seq
Seems like pcall doesn't always return a string as a 2nd element of the tuple.
Diffstat (limited to 'test/functional/helpers.lua')
-rw-r--r--test/functional/helpers.lua7
1 files changed, 6 insertions, 1 deletions
diff --git a/test/functional/helpers.lua b/test/functional/helpers.lua
index 0f2b04ea00..77d4b573fc 100644
--- a/test/functional/helpers.lua
+++ b/test/functional/helpers.lua
@@ -186,7 +186,12 @@ function module.expect_msg_seq(...)
if status then
return result
end
- final_error = cat_err(final_error, result)
+ local message = result
+ if type(result) == "table" then
+ -- 'eq' returns several things
+ message = result.message
+ end
+ final_error = cat_err(final_error, message)
end
error(final_error)
end