Fix 9 - googletest-options-test failure on OS/2
This commit is contained in:
parent
77e00c9c72
commit
8afebd353d
|
@ -445,7 +445,7 @@ static ::std::vector<std::string> g_argvs;
|
||||||
FilePath GetCurrentExecutableName() {
|
FilePath GetCurrentExecutableName() {
|
||||||
FilePath result;
|
FilePath result;
|
||||||
|
|
||||||
#if GTEST_OS_WINDOWS
|
#if GTEST_OS_WINDOWS || GTEST_OS_OS2
|
||||||
result.Set(FilePath(GetArgvs()[0]).RemoveExtension("exe"));
|
result.Set(FilePath(GetArgvs()[0]).RemoveExtension("exe"));
|
||||||
#else
|
#else
|
||||||
result.Set(FilePath(GetArgvs()[0]));
|
result.Set(FilePath(GetArgvs()[0]));
|
||||||
|
|
|
@ -94,9 +94,13 @@ TEST(XmlOutputTest, GetOutputFileFromDirectoryPath) {
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if GTEST_OS_OS2
|
||||||
|
# define _strcmpi strcasecmp
|
||||||
|
#endif
|
||||||
|
|
||||||
TEST(OutputFileHelpersTest, GetCurrentExecutableName) {
|
TEST(OutputFileHelpersTest, GetCurrentExecutableName) {
|
||||||
const std::string exe_str = GetCurrentExecutableName().string();
|
const std::string exe_str = GetCurrentExecutableName().string();
|
||||||
#if GTEST_OS_WINDOWS
|
#if GTEST_OS_WINDOWS || GTEST_OS_OS2
|
||||||
const bool success =
|
const bool success =
|
||||||
_strcmpi("googletest-options-test", exe_str.c_str()) == 0 ||
|
_strcmpi("googletest-options-test", exe_str.c_str()) == 0 ||
|
||||||
_strcmpi("gtest-options-ex_test", exe_str.c_str()) == 0 ||
|
_strcmpi("gtest-options-ex_test", exe_str.c_str()) == 0 ||
|
||||||
|
|
Loading…
Reference in New Issue
Block a user