Omit comment when reading --gtest_list_tests option's output.
Gtest add comments when listing typed tests. And we should omit them.
Bug: 23040880
Change-Id: If6034af301337fc06eeab294d2dbe5317a6b7f91
diff --git a/tests/gtest_main.cpp b/tests/gtest_main.cpp
index 692b7e8..35211da 100644
--- a/tests/gtest_main.cpp
+++ b/tests/gtest_main.cpp
@@ -256,7 +256,7 @@
while (*p != '\0' && isspace(*p)) {
++p;
}
- if (*p != '\0') {
+ if (*p != '\0' && *p != '#') {
// This is not we want, gtest must meet with some error when parsing the arguments.
fprintf(stderr, "argument error, check with --help\n");
return false;