aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorAdam Harrison <adamdharrison@gmail.com>2023-01-16 20:15:30 -0500
committerAdam Harrison <adamdharrison@gmail.com>2023-01-16 20:15:30 -0500
commit14578e4d072e780678a7e98b14a13372809e6022 (patch)
tree0f974b000f9b10c5b5f509d507f818a86d098d78 /t
parent9067926de3753dadccecd5b899196ef82e498572 (diff)
downloadlite-xl-plugin-manager-14578e4d072e780678a7e98b14a13372809e6022.tar.gz
lite-xl-plugin-manager-14578e4d072e780678a7e98b14a13372809e6022.zip
Updated lpm, to fix all of JGM's raised issues.v0.9991
Diffstat (limited to 't')
-rw-r--r--t/run.lua10
1 files changed, 8 insertions, 2 deletions
diff --git a/t/run.lua b/t/run.lua
index 679d72f..d774be0 100644
--- a/t/run.lua
+++ b/t/run.lua
@@ -74,6 +74,7 @@ local tests = {
assert(plugins[1].status == "available")
local actions = lpm("install lsp")
assert_exists(userdir .. "/plugins/lsp/init.lua")
+ assert_exists(userdir .. "/libraries/widget/init.lua")
break
end
end
@@ -85,14 +86,19 @@ local tests = {
end,
["08_install_many"] = function()
lpm("install encoding gitblame gitstatus language_ts lsp minimap")
+ end,
+ ["09_misc_commands"] = function()
+ lpm("update")
+ lpm("upgrade")
end
}
local last_command_result, last_command
lpm = function(cmd)
- last_command = "./lpm --quiet --json --userdir=" .. userdir .. " " .. cmd
+ last_command = "./lpm --quiet --json --assume-yes --userdir=" .. userdir .. " " .. cmd
local pipe = io.popen(last_command, "r")
- last_command_result = json.decode(pipe:read("*all"))
+ local result = pipe:read("*all")
+ last_command_result = result ~= "" and json.decode(result) or nil
local success = pipe:close()
if not success then error("error calling lpm", 2) end
return last_command_result