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.
This commit is contained in:
Matthieu Coudron 2018-11-09 23:52:57 +09:00 committed by James McCoy
parent b1e4ec1c2a
commit 4598e489c7
No known key found for this signature in database
GPG Key ID: DFE691AE331BA3DB

View File

@ -186,7 +186,12 @@ function module.expect_msg_seq(...)
if status then if status then
return result return result
end 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 end
error(final_error) error(final_error)
end end