diff options
author | strank <strank@strank.info> | 2020-09-01 16:46:05 -0400 |
---|---|---|
committer | strank <strank@strank.info> | 2020-09-02 11:23:34 -0400 |
commit | 16913368eba145d0e855bdbf654494f3bc9da543 (patch) | |
tree | d79095022c62eda6b9c856151ba1ee50ef4a5c93 | |
parent | 358e209fa049887fd4212c52c9faba0ca9d6e111 (diff) |
Fix doctest runner ignoring all arguments starting with --test
Instead of just the one argument that is exactly --test.
The long-form arguments --test-case and --test-suite were ignored.
-rw-r--r-- | tests/test_main.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/test_main.cpp b/tests/test_main.cpp index 1c9535174b..4e172caadb 100644 --- a/tests/test_main.cpp +++ b/tests/test_main.cpp @@ -86,8 +86,9 @@ int test_main(int argc, char *argv[]) { // Clean arguments of "--test" from the args. 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. |