fix(tests): change 'break' to 'return' in run_tests
Changing 'break' to 'return' in the run_tests function to stop the test loop when a failure occurs, improving test harness behavior by returning from the function instead of breaking out of the loop.
This commit is contained in:
parent
199abfba88
commit
514e089214
2
base.lua
2
base.lua
@ -547,7 +547,7 @@ local run_tests = function()
|
|||||||
failed = failed + 1
|
failed = failed + 1
|
||||||
if minetest.settings:get_bool("test_harness_failfast", false) then
|
if minetest.settings:get_bool("test_harness_failfast", false) then
|
||||||
tests_state = TESTS_STATE_ENUM.DONE
|
tests_state = TESTS_STATE_ENUM.DONE
|
||||||
break
|
return
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user