aboutsummaryrefslogtreecommitdiff
path: root/test/helpers.lua
diff options
context:
space:
mode:
authorBjörn Linse <bjorn.linse@gmail.com>2020-11-04 10:41:22 +0100
committerBjörn Linse <bjorn.linse@gmail.com>2020-11-05 14:46:41 +0100
commit1b0e4a5906d3c9fcb4290f943c7b048b3c35353b (patch)
tree9a9e48bae3de8a7a68c3fb911fd6f3f6f3ec7948 /test/helpers.lua
parentaaaad0f5934460dfaf7ef7a29dcf38060c641b43 (diff)
downloadrneovim-1b0e4a5906d3c9fcb4290f943c7b048b3c35353b.tar.gz
rneovim-1b0e4a5906d3c9fcb4290f943c7b048b3c35353b.tar.bz2
rneovim-1b0e4a5906d3c9fcb4290f943c7b048b3c35353b.zip
lua: make vim.inspect available early so it can be used for path debugging
Diffstat (limited to 'test/helpers.lua')
-rw-r--r--test/helpers.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/helpers.lua b/test/helpers.lua
index 68f0c92244..84148dc1a8 100644
--- a/test/helpers.lua
+++ b/test/helpers.lua
@@ -139,7 +139,9 @@ function module.pcall_err_withfile(fn, ...)
-- C:/long/path/foo.lua:186: Expected string, got number
-- to:
-- .../foo.lua:0: Expected string, got number
- local errmsg = tostring(rv):gsub('[^%s]-[/\\]([^%s:/\\]+):%d+', '.../%1:0')
+ local errmsg = tostring(rv):gsub('([%s<])vim[/\\]([^%s:/\\]+):%d+', '%1\xffvim\xff%2:0')
+ :gsub('[^%s<]-[/\\]([^%s:/\\]+):%d+', '.../%1:0')
+ :gsub('\xffvim\xff', 'vim/')
-- Scrub numbers in paths/stacktraces:
-- shared.lua:0: in function 'gsplit'
-- shared.lua:0: in function <shared.lua:0>'