From 5bead5c0bd5bd0e22f1e938963b6083ba9aa2b33 Mon Sep 17 00:00:00 2001 From: isabel Date: Thu, 28 Mar 2024 15:48:17 +0000 Subject: [PATCH] fix: allow files to be read properly --- tests/charm-freeze/test_all.lua | 4 ++-- tests/init.lua | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/charm-freeze/test_all.lua b/tests/charm-freeze/test_all.lua index b40af3a..58ac0a7 100644 --- a/tests/charm-freeze/test_all.lua +++ b/tests/charm-freeze/test_all.lua @@ -5,8 +5,8 @@ local child = MiniTest.new_child_neovim() local T = MiniTest.new_set({ hooks = { pre_case = function() - child.restart() - child.lua([[P = require('.///////lua/charm-freeze')]]) + child.restart({ "-u", "tests/init.lua" }) + child.lua([[P = require('charm-freeze')]]) end, -- Stop once all test cases are finished post_once = child.stop, diff --git a/tests/init.lua b/tests/init.lua index 70ba907..77e76d2 100644 --- a/tests/init.lua +++ b/tests/init.lua @@ -35,6 +35,7 @@ function M.setup() vim.env.XDG_DATA_HOME = M.root(".tests/data") vim.env.XDG_STATE_HOME = M.root(".tests/state") vim.env.XDG_CACHE_HOME = M.root(".tests/cache") + vim.cmd([[let &rtp.=",".getcwd()]]) end M.setup()