summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/tests/gdscript_test_runner.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2023-04-27 08:19:54 +0200
committerRémi Verschelde <rverschelde@gmail.com>2023-04-27 08:19:54 +0200
commit80568be36ffa38fafdb7e80a1d2f147cdb1fbf0e (patch)
tree1f6fb663dc97119fe3ab1e3cf65c9ee639dc5573 /modules/gdscript/tests/gdscript_test_runner.cpp
parent5a1d4bd8ab8149bbd7db7f5c2b601213d212472f (diff)
parent221deb1cc130d176c499ebc67db83e7018eafd55 (diff)
downloadredot-engine-80568be36ffa38fafdb7e80a1d2f147cdb1fbf0e.tar.gz
Merge pull request #76481 from vnen/gdscript-test-gen-default-path
GDScript: Use default path in test generator if not provided
Diffstat (limited to 'modules/gdscript/tests/gdscript_test_runner.cpp')
-rw-r--r--modules/gdscript/tests/gdscript_test_runner.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/modules/gdscript/tests/gdscript_test_runner.cpp b/modules/gdscript/tests/gdscript_test_runner.cpp
index 57405aa1ce..6299e5d584 100644
--- a/modules/gdscript/tests/gdscript_test_runner.cpp
+++ b/modules/gdscript/tests/gdscript_test_runner.cpp
@@ -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();