mirror of
https://github.com/google/googletest.git
synced 2026-06-15 08:26:11 +08:00
Merge 1abf935ae93424682685f7e0ea3d3d5841b338ce into 7140cd416cecd7462a8aae488024abeee55598e4
This commit is contained in:
commit
832b81130e
@ -6868,12 +6868,13 @@ void ParseGoogleTestFlagsOnlyImpl(int* argc, CharType** argv) {
|
||||
LoadFlagsFromFile(flagfile_value);
|
||||
remove_flag = true;
|
||||
#endif // GTEST_USE_OWN_FLAGFILE_FLAG_ && GTEST_HAS_FILE_SYSTEM
|
||||
} else if (arg_string == "--help" || HasGoogleTestFlagPrefix(arg)) {
|
||||
} else if (arg_string == "--help" || HasGoogleTestFlagPrefix(arg)) {
|
||||
// Both help flag and unrecognized Google Test flags (excluding
|
||||
// internal ones) trigger help display.
|
||||
g_help_flag = true;
|
||||
remove_flag = true; // Ensure --help flag is consumed and removed from argv
|
||||
}
|
||||
|
||||
|
||||
if (remove_flag) {
|
||||
// Shift the remainder of the argv list left by one.
|
||||
for (int j = i + 1; j < *argc; ++j) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user