| 6529 | |
| 6530 | #if GTEST_USE_OWN_FLAGFILE_FLAG_ |
| 6531 | static void LoadFlagsFromFile(const std::string& path) { |
| 6532 | FILE* flagfile = posix::FOpen(path.c_str(), "r"); |
| 6533 | if (!flagfile) { |
| 6534 | GTEST_LOG_(FATAL) << "Unable to open file \"" << GTEST_FLAG(flagfile) |
| 6535 | << "\""; |
| 6536 | } |
| 6537 | std::string contents(ReadEntireFile(flagfile)); |
| 6538 | posix::FClose(flagfile); |
| 6539 | std::vector<std::string> lines; |
| 6540 | SplitString(contents, '\n', &lines); |
| 6541 | for (size_t i = 0; i < lines.size(); ++i) { |
| 6542 | if (lines[i].empty()) |
| 6543 | continue; |
| 6544 | if (!ParseGoogleTestFlag(lines[i].c_str())) |
| 6545 | g_help_flag = true; |
| 6546 | } |
| 6547 | } |
| 6548 | #endif // GTEST_USE_OWN_FLAGFILE_FLAG_ |
| 6549 | |
| 6550 | // Parses the command line for Google Test flags, without initializing |
no test coverage detected