aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorAdam Harrison <adamdharrison@gmail.com>2023-01-13 14:47:00 -0500
committerAdam Harrison <adamdharrison@gmail.com>2023-01-13 14:47:00 -0500
commit17ce7c5ee47b4febde65d571993d4c963d85fcc1 (patch)
tree789075caebcd656fd8ec96fad818e861114abd67 /t
parent9424e382ece5181f00f70f79219e3248a468eeaa (diff)
downloadlite-xl-plugin-manager-17ce7c5ee47b4febde65d571993d4c963d85fcc1.tar.gz
lite-xl-plugin-manager-17ce7c5ee47b4febde65d571993d4c963d85fcc1.zip
Updated it so that lpm can run tests.
Diffstat (limited to 't')
-rw-r--r--t/run.lua13
1 files changed, 5 insertions, 8 deletions
diff --git a/t/run.lua b/t/run.lua
index 8c60b9c..265d2aa 100644
--- a/t/run.lua
+++ b/t/run.lua
@@ -85,10 +85,6 @@ local tests = {
end
}
-
-
-
-
local last_command_result, last_command
lpm = function(cmd)
last_command = "./lpm --quiet --json --userdir=" .. userdir .. " " .. cmd
@@ -121,12 +117,14 @@ local function run_tests(tests, arg)
local failed = false
xpcall(v, function(err)
print("[FAIL]: " .. debug.traceback(err, 2))
- print()
- print()
if last_command then
print("Last Command: " .. last_command)
- print(json.encode(last_command_result))
+ if last_command_result then
+ print(json.encode(last_command_result))
+ end
end
+ print()
+ print()
fail_count = fail_count + 1
failed = true
end)
@@ -137,5 +135,4 @@ local function run_tests(tests, arg)
os.exit(fail_count)
end
-
run_tests(tests, arg)