1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Merge pull request #52068 from ThreeRhinosInAnElephantCostume/fixgdscript

Fix parse error on statement-less files with only newlines, add a warning for empty files.
This commit is contained in:
Rémi Verschelde
2021-09-13 17:30:31 +02:00
committed by GitHub
13 changed files with 57 additions and 4 deletions

View File

@@ -496,7 +496,10 @@ GDScriptTest::TestResult GDScriptTest::execute_test_code(bool p_is_generating) {
}
return result;
}
// Script files matching this pattern are allowed to not contain a test() function.
if (source_file.match("*.notest.gd")) {
return result;
}
// Test running.
const Map<StringName, GDScriptFunction *>::Element *test_function_element = script->get_member_functions().find(GDScriptTestRunner::test_function_name);
if (test_function_element == nullptr) {