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:
Justin M. Keyes
2020-09-12 19:04:22 -07:00
committed by TJ DeVries
parent aad7a74053
commit 8e77d70e29
9 changed files with 190 additions and 103 deletions

View File

@@ -59,7 +59,7 @@ describe('floatwin', function()
end)
it('closed immediately by autocmd #11383', function()
eq('Error executing lua: [string "<nvim>"]:4: Window was closed immediately',
eq('Error executing lua: [string "<nvim>"]:0: Window was closed immediately',
pcall_err(exec_lua, [[
local a = vim.api
local function crashes(contents)