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/terminal | |
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/terminal')
-rw-r--r-- | test/functional/terminal/tui_spec.lua | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/test/functional/terminal/tui_spec.lua b/test/functional/terminal/tui_spec.lua index f7520b14d4..6b9586b4de 100644 --- a/test/functional/terminal/tui_spec.lua +++ b/test/functional/terminal/tui_spec.lua @@ -494,6 +494,8 @@ describe('TUI', function() it('paste: recovers from vim.paste() failure', function() child_session:request('nvim_exec_lua', [[ _G.save_paste_fn = vim.paste + -- Stack traces for this test are non-deterministic, so disable them + _G.debug.traceback = function(msg) return msg end vim.paste = function(lines, phase) error("fake fail") end ]], {}) -- Prepare something for dot-repeat/redo. @@ -514,7 +516,7 @@ describe('TUI', function() foo | | {5: }| - {8:paste: Error executing lua: [string "<nvim>"]:2: f}| + {8:paste: Error executing lua: [string "<nvim>"]:4: f}| {8:ake fail} | {10:Press ENTER or type command to continue}{1: } | {3:-- TERMINAL --} | @@ -579,12 +581,16 @@ describe('TUI', function() it("paste: 'nomodifiable' buffer", function() child_session:request('nvim_command', 'set nomodifiable') + child_session:request('nvim_exec_lua', [[ + -- Stack traces for this test are non-deterministic, so disable them + _G.debug.traceback = function(msg) return msg end + ]], {}) feed_data('\027[200~fail 1\nfail 2\n\027[201~') screen:expect{grid=[[ | {4:~ }| {5: }| - {MATCH:paste: Error executing lua: vim.lua:%d+: Vim:E21: }| + {8:paste: Error executing lua: vim.lua:243: Vim:E21: }| {8:Cannot make changes, 'modifiable' is off} | {10:Press ENTER or type command to continue}{1: } | {3:-- TERMINAL --} | @@ -671,8 +677,8 @@ describe('TUI', function() item 2997 | item 2998 | item 2999 | - item 3000 en{1:d}d | - {5:[No Name] [+] 5999,13 Bot}| + item 3000 en{1:d} | + {5:[No Name] [+] 3000,13 Bot}| | {3:-- TERMINAL --} | ]]) |