diff options
author | Gregory Anders <8965202+gpanders@users.noreply.github.com> | 2021-11-06 08:26:10 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-06 08:26:10 -0600 |
commit | 03b805aee617f67eb7f33a54822bc76c23a2c5f5 (patch) | |
tree | fc27127d462fe91159eb99c5a724c7b10e459f1b /test/functional/lua/luaeval_spec.lua | |
parent | 1fdbd29dfa6366f8346693d0bf67f4f782ab0f32 (diff) | |
download | rneovim-03b805aee617f67eb7f33a54822bc76c23a2c5f5.tar.gz rneovim-03b805aee617f67eb7f33a54822bc76c23a2c5f5.tar.bz2 rneovim-03b805aee617f67eb7f33a54822bc76c23a2c5f5.zip |
feat(lua): enable stack traces in error output (#16228)
Diffstat (limited to 'test/functional/lua/luaeval_spec.lua')
-rw-r--r-- | test/functional/lua/luaeval_spec.lua | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/test/functional/lua/luaeval_spec.lua b/test/functional/lua/luaeval_spec.lua index ab76e71a12..c543dd1995 100644 --- a/test/functional/lua/luaeval_spec.lua +++ b/test/functional/lua/luaeval_spec.lua @@ -4,6 +4,7 @@ local Screen = require('test.functional.ui.screen') local pcall_err = helpers.pcall_err local exc_exec = helpers.exc_exec +local remove_trace = helpers.remove_trace local exec_lua = helpers.exec_lua local command = helpers.command local meths = helpers.meths @@ -424,11 +425,11 @@ describe('luaeval()', function() it('errors out correctly when doing incorrect things in lua', function() -- Conversion errors eq('Vim(call):E5108: Error executing lua [string "luaeval()"]:1: attempt to call field \'xxx_nonexistent_key_xxx\' (a nil value)', - exc_exec([[call luaeval("vim.xxx_nonexistent_key_xxx()")]])) + remove_trace(exc_exec([[call luaeval("vim.xxx_nonexistent_key_xxx()")]]))) eq('Vim(call):E5108: Error executing lua [string "luaeval()"]:1: ERROR', - exc_exec([[call luaeval("error('ERROR')")]])) + remove_trace(exc_exec([[call luaeval("error('ERROR')")]]))) eq('Vim(call):E5108: Error executing lua [NULL]', - exc_exec([[call luaeval("error(nil)")]])) + remove_trace(exc_exec([[call luaeval("error(nil)")]]))) end) it('does not leak memory when called with too long line', |