-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
50e2e30
commit ac2c12d
Showing
4 changed files
with
31 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
doc/tags | ||
.test_output.tmp | ||
lua_modules/ | ||
luarocks | ||
.luarocks/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
---@param command string | ||
---@param args string[] | ||
---@return string | ||
local function run_command(command, args) | ||
local result = vim.fn.system(vim.list_extend({ command }, args)) | ||
|
||
if vim.v.shell_error ~= 0 then | ||
error("Failed to run command") | ||
end | ||
|
||
return result | ||
end | ||
|
||
-- Path for the plugin being tested | ||
vim.opt.rtp:append(".") | ||
|
||
local lua_path = run_command("luarocks", { "path", "--lr-path" }) | ||
local lua_cpath = run_command("luarocks", { "path", "--lr-cpath" }) | ||
|
||
-- Paths for the project-local luarocks packages | ||
package.path = package.path .. ";" .. lua_path | ||
|
||
-- Paths for the project-local shared libraries | ||
package.cpath = package.cpath .. ";" .. lua_cpath | ||
|
||
require("busted.runner")({ standalone = false }) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters