test/pcall_err(): truncate full paths, omit linenr

ref #11271
This commit is contained in:
Justin M. Keyes
2019-10-26 01:30:58 -07:00
parent 996a057fb9
commit 316c29bbf3
3 changed files with 33 additions and 25 deletions

View File

@@ -15,9 +15,7 @@ before_each(clear)
describe('treesitter API', function()
-- error tests not requiring a parser library
it('handles missing language', function()
local path_pat = 'Error executing lua: '..(iswin() and '.+\\vim\\' or '.+/vim/')
matches(path_pat..'treesitter.lua:39: no such language: borklang',
eq('Error executing lua: .../treesitter.lua: no such language: borklang',
pcall_err(exec_lua, "parser = vim.treesitter.create_parser(0, 'borklang')"))
-- actual message depends on platform