commit 3a3ec37260592b6c5ab96c4e8f7f96a7b411829f
parent bfb28b62dab756ec76a73506c2070ddf491a0cdd
Author: dundargoc <33953936+dundargoc@users.noreply.github.com>
Date: Fri, 14 Apr 2023 00:09:56 +0200
test: remove penlight usage
Diffstat:
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git 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