summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrancesco Guastella <[email protected]>2025-06-25 19:45:22 +0200
committerFrancesco Guastella <[email protected]>2025-06-25 19:45:22 +0200
commit7b4d08538adbca2fe5f0ec1203da911967c9ddad (patch)
tree805cf3c141efe196f40acc31413bd018e10f5e27
parentf188e3538adbf2981b552db28b486cb196868b2b (diff)
Minor change
-rw-r--r--xmake/actions/test/main.lua16
1 files changed, 8 insertions, 8 deletions
diff --git a/xmake/actions/test/main.lua b/xmake/actions/test/main.lua
index b86029b52..84763017f 100644
--- a/xmake/actions/test/main.lua
+++ b/xmake/actions/test/main.lua
@@ -168,25 +168,25 @@ function _do_test_target(target, opt)
end
end
- if errors and #errors > 0 then
- opt.errors = errors
- end
-
if should_fail then
if not passed then
passed = true
- opt.errors = nil -- clear errors, since failure was expected
+ errors = nil -- clear errors, since failure was expected
else
passed = false
local extra_info = string.format("Test %s unexpectedly passed (should fail)", opt.name)
- if opt.errors and #opt.errors > 0 then
- opt.errors = opt.errors .. "\n" .. extra_info
+ if errors and #errors > 0 then
+ errors = errors .. "\n" .. extra_info
else
- opt.errors = extra_info
+ errors = extra_info
end
end
end
+ if errors and #errors > 0 then
+ opt.errors = errors
+ end
+
return passed
end