Merge pull request #41128 from Xrayez/premature-tests

Properly detect `--test` command-line argument
This commit is contained in:
Rémi Verschelde 2020-08-11 11:52:51 +02:00 committed by GitHub
commit e1bfa8b80a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -372,7 +372,7 @@ void Main::print_help(const char *p_binary) {
int Main::test_entrypoint(int argc, char *argv[], bool &tests_need_run) {
#ifdef TESTS_ENABLED
for (int x = 0; x < argc; x++) {
if (strncmp(argv[x], "--test", 6) == 0) {
if ((strncmp(argv[x], "--test", 6) == 0) && (strlen(argv[x]) == 6)) {
tests_need_run = true;
OS::get_singleton()->initialize();
StringName::setup();