From 17ce7c5ee47b4febde65d571993d4c963d85fcc1 Mon Sep 17 00:00:00 2001 From: Adam Harrison Date: Fri, 13 Jan 2023 14:47:00 -0500 Subject: Updated it so that lpm can run tests. --- t/run.lua | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 't/run.lua') 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) -- cgit v1.2.3