mirror of
https://github.com/neovim/neovim.git
synced 2024-12-19 18:55:14 -07:00
fix(test/dumplog): tostring(rv) before formatting as string
For example, implicitly converting a table to a string works in LuaJIT, but needs to be done explicitly with tostring() in Lua 5.1. This can cause issues when testing a non-JIT build if eq(), for example, fails with a table argument. E.g: eq({}, {1}) will not print the details of the assertion failure, but will instead print a less helpful "string expected, got table" error.
This commit is contained in:
parent
5fdf741f77
commit
ddaa0cc9be
@ -70,7 +70,7 @@ local function dumplog(logfile, fn, ...)
|
||||
if status == false then
|
||||
logfile = logfile or os.getenv('NVIM_LOG_FILE') or '.nvimlog'
|
||||
local logtail = module.read_nvim_log(logfile)
|
||||
error(string.format('%s\n%s', rv, logtail))
|
||||
error(string.format('%s\n%s', tostring(rv), logtail))
|
||||
end
|
||||
end
|
||||
function module.eq(expected, actual, context, logfile)
|
||||
|
Loading…
Reference in New Issue
Block a user