aboutsummaryrefslogtreecommitdiff
path: root/test/helpers.lua
diff options
context:
space:
mode:
Diffstat (limited to 'test/helpers.lua')
-rw-r--r--test/helpers.lua7
1 files changed, 6 insertions, 1 deletions
diff --git a/test/helpers.lua b/test/helpers.lua
index 94dcf86c4d..34c2036798 100644
--- a/test/helpers.lua
+++ b/test/helpers.lua
@@ -3,7 +3,6 @@ local shared = vim
local assert = require('luassert')
local busted = require('busted')
local luv = require('luv')
-local relpath = require('pl.path').relpath
local Paths = require('test.cmakeconfig.paths')
assert:set_parameter('TableFormatLevel', 100)
@@ -21,6 +20,12 @@ local module = {
REMOVE_THIS = {},
}
+local function relpath(p)
+ p = vim.fs.normalize(p)
+ local cwd = luv.cwd()
+ return p:gsub("^" .. cwd)
+end
+
function module.isdir(path)
if not path then
return false