summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2022-07-29 15:30:52 +0200
committerJuan Linietsky <reduzio@gmail.com>2022-08-01 00:56:59 +0200
commit0dd65378e7594e8916474613116d8df485870710 (patch)
treeba77e856d19325ab1be79c19e18c4650e70de249 /tests
parent6d599ed90b396c264486512d5903c209ce729c76 (diff)
Add support for command-line user arguments.
Implements the standard Unix double dash (--) commandline argument: * Arguments after a double dash (--) are ignored by Godot and stored for the user. * User can access them via `OS.get_cmdline_user_args()` Example: `godot.exe scene_to_run.tscn --fullscreen -- --start-level 2`
Diffstat (limited to 'tests')
-rw-r--r--tests/test_main.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/test_main.cpp b/tests/test_main.cpp
index 40fe562be1..16654181c6 100644
--- a/tests/test_main.cpp
+++ b/tests/test_main.cpp
@@ -105,7 +105,7 @@ int test_main(int argc, char *argv[]) {
for (int i = 0; i < argc; i++) {
args.push_back(String::utf8(argv[i]));
}
- OS::get_singleton()->set_cmdline("", args);
+ OS::get_singleton()->set_cmdline("", args, List<String>());
// Run custom test tools.
if (test_commands) {