You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-19 14:31:59 +00:00
Be explicit about usage of GDScript tests
Also drop empty "image" test, and print proper error when passing wrong test name. Fixes #25638.
This commit is contained in:
@@ -911,11 +911,14 @@ MainLoop *test(TestType p_type) {
|
||||
List<String> cmdlargs = OS::get_singleton()->get_cmdline_args();
|
||||
|
||||
if (cmdlargs.empty()) {
|
||||
//try editor!
|
||||
return NULL;
|
||||
}
|
||||
|
||||
String test = cmdlargs.back()->get();
|
||||
if (!test.ends_with(".gd") && !test.ends_with(".gdc")) {
|
||||
print_line("This test expects a path to a GDScript file as its last parameter. Got: " + test);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
FileAccess *fa = FileAccess::open(test, FileAccess::READ);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user