From c3638574267b0af5ca086b923e1c1777d1dd131d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Sun, 10 Feb 2019 14:54:16 +0100 Subject: Be explicit about usage of GDScript tests Also drop empty "image" test, and print proper error when passing wrong test name. Fixes #25638. --- main/tests/test_gdscript.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'main/tests/test_gdscript.cpp') diff --git a/main/tests/test_gdscript.cpp b/main/tests/test_gdscript.cpp index 60f9568fbd..27ff2addf3 100644 --- a/main/tests/test_gdscript.cpp +++ b/main/tests/test_gdscript.cpp @@ -911,11 +911,14 @@ MainLoop *test(TestType p_type) { List 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); -- cgit v1.2.3