1
0
mirror of https://github.com/godotengine/godot.git synced 2026-01-03 19:11:41 +00:00

Merge pull request #76481 from vnen/gdscript-test-gen-default-path

GDScript: Use default path in test generator if not provided
This commit is contained in:
Rémi Verschelde
2023-04-27 08:19:54 +02:00

View File

@@ -350,13 +350,13 @@ void GDScriptTestRunner::handle_cmdline() {
for (List<String>::Element *E = cmdline_args.front(); E; E = E->next()) {
String &cmd = E->get();
if (cmd == "--gdscript-generate-tests") {
if (E->next() == nullptr) {
ERR_PRINT("Needed a path for the test files.");
exit(-1);
String path;
if (E->next()) {
path = E->next()->get();
} else {
path = "modules/gdscript/tests/scripts";
}
const String &path = E->next()->get();
GDScriptTestRunner runner(path, false, cmdline_args.find("--print-filenames") != nullptr);
bool completed = runner.generate_outputs();