aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
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)