Răsfoiți Sursa

Merge pull request #41687 from strank/doctest-runner-argv-bug

Fix doctest runner ignoring all arguments starting with --test
Rémi Verschelde 5 ani în urmă
părinte
comite
e77fc1486b
1 a modificat fișierele cu 3 adăugiri și 2 ștergeri
  1. 3 2
      tests/test_main.cpp

+ 3 - 2
tests/test_main.cpp

@@ -86,8 +86,9 @@ int test_main(int argc, char *argv[]) {
 
 
 	// Clean arguments of "--test" from the args.
 	// Clean arguments of "--test" from the args.
 	for (int x = 0; x < argc; x++) {
 	for (int x = 0; x < argc; x++) {
-		if (strncmp(argv[x], "--test", 6) != 0) {
-			test_args.push_back(String(argv[x]));
+		String arg = String(argv[x]);
+		if (arg != "--test") {
+			test_args.push_back(arg);
 		}
 		}
 	}
 	}
 	// Convert Godot command line arguments back to standard arguments.
 	// Convert Godot command line arguments back to standard arguments.