MCPcopy Create free account
hub / github.com/Redot-Engine/redot-engine / handle_cmdline

Method handle_cmdline

modules/gdscript/tests/gdscript_test_runner.cpp:418–438  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

416}
417
418void GDScriptTestRunner::handle_cmdline() {
419 List<String> cmdline_args = OS::get_singleton()->get_cmdline_args();
420
421 for (List<String>::Element *E = cmdline_args.front(); E; E = E->next()) {
422 String &cmd = E->get();
423 if (cmd == "--gdscript-generate-tests") {
424 String path;
425 if (E->next()) {
426 path = E->next()->get();
427 } else {
428 path = "modules/gdscript/tests/scripts";
429 }
430
431 GDScriptTestRunner runner(path, false, cmdline_args.find("--print-filenames") != nullptr);
432
433 bool completed = runner.generate_outputs();
434 int failed = completed ? 0 : -1;
435 exit(failed);
436 }
437 }
438}
439
440void GDScriptTest::enable_stdout() {
441 /// @todo This could likely be handled by doctest or `tests/test_macros.h`.

Callers

nothing calls this directly

Calls 6

generate_outputsMethod · 0.80
get_cmdline_argsMethod · 0.45
frontMethod · 0.45
nextMethod · 0.45
getMethod · 0.45
findMethod · 0.45

Tested by

no test coverage detected