summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorMax Hilbrunner <mhilbrunner@users.noreply.github.com>2021-09-13 23:29:38 +0200
committerGitHub <noreply@github.com>2021-09-13 23:29:38 +0200
commit7cdd8629ad4c2994c7882fe2c1dccd29ce5dec2c (patch)
tree4f07ab315cb5b541e218b2964bf72c774b82b898 /modules
parentad9717bc8fbaf6ebfe5dea3cae9c419be90e8ae3 (diff)
parent2c71134aa40b7aeb092531403db0d5f43fd13a1f (diff)
Merge pull request #52643 from ThreeRhinosInAnElephantCostume/fixgdscript
Fix an undefined behaviour causing random test failures
Diffstat (limited to 'modules')
-rw-r--r--modules/gdscript/tests/gdscript_test_runner.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/gdscript/tests/gdscript_test_runner.cpp b/modules/gdscript/tests/gdscript_test_runner.cpp
index f65402b578..c383830c82 100644
--- a/modules/gdscript/tests/gdscript_test_runner.cpp
+++ b/modules/gdscript/tests/gdscript_test_runner.cpp
@@ -415,6 +415,7 @@ GDScriptTest::TestResult GDScriptTest::execute_test_code(bool p_is_generating) {
TestResult result;
result.status = GDTEST_OK;
result.output = String();
+ result.passed = false;
Error err = OK;
@@ -498,6 +499,8 @@ GDScriptTest::TestResult GDScriptTest::execute_test_code(bool p_is_generating) {
}
// Script files matching this pattern are allowed to not contain a test() function.
if (source_file.match("*.notest.gd")) {
+ enable_stdout();
+ result.passed = check_output(result.output);
return result;
}
// Test running.