mirror of
https://github.com/neovim/neovim.git
synced 2025-09-07 03:48:18 +00:00
test/vim.validate(): assert normalized stacktrace
- The previous commit lost information in the tests. Instead, add some more "normalization" substitutions in pcall_err(), so that the general shape of the stacktrace is included in the asserted text. - Eliminate contains(), it is redundant with matches()
This commit is contained in:

committed by
TJ DeVries

parent
aad7a74053
commit
8e77d70e29
@@ -43,7 +43,7 @@ describe(':lua command', function()
|
||||
eq({'', 'ETTS', 'TTSE', 'STTE'}, curbufmeths.get_lines(0, 100, false))
|
||||
end)
|
||||
it('throws catchable errors', function()
|
||||
eq([[Vim(lua):E5107: Error loading lua [string ":lua"]:1: unexpected symbol near ')']],
|
||||
eq([[Vim(lua):E5107: Error loading lua [string ":lua"]:0: unexpected symbol near ')']],
|
||||
pcall_err(command, 'lua ()'))
|
||||
eq([[Vim(lua):E5108: Error executing lua [string ":lua"]:1: TEST]],
|
||||
exc_exec('lua error("TEST")'))
|
||||
|
Reference in New Issue
Block a user