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:
Yves-Marie Haussonne 2024-10-02 11:24:24 +02:00
parent 199abfba88
commit 514e089214

View File

@ -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