Implement separate OS/2 codes comparing exe names with strcasecmp()

This commit is contained in:
KO Myung-Hun 2018-10-11 17:38:51 +09:00
parent ef3103a5c9
commit 24e44591c4

View File

@ -94,18 +94,20 @@ TEST(XmlOutputTest, GetOutputFileFromDirectoryPath) {
#endif
}
#if GTEST_OS_OS2
# define _strcmpi strcasecmp
#endif
TEST(OutputFileHelpersTest, GetCurrentExecutableName) {
const std::string exe_str = GetCurrentExecutableName().string();
#if GTEST_OS_WINDOWS || GTEST_OS_OS2
#if GTEST_OS_WINDOWS
const bool success =
_strcmpi("googletest-options-test", exe_str.c_str()) == 0 ||
_strcmpi("gtest-options-ex_test", exe_str.c_str()) == 0 ||
_strcmpi("gtest_all_test", exe_str.c_str()) == 0 ||
_strcmpi("gtest_dll_test", exe_str.c_str()) == 0;
#elif GTEST_OS_OS2
const bool success =
strcasecmp("googletest-options-test", exe_str.c_str()) == 0 ||
strcasecmp("gtest-options-ex_test", exe_str.c_str()) == 0 ||
strcasecmp("gtest_all_test", exe_str.c_str()) == 0 ||
strcasecmp("gtest_dll_test", exe_str.c_str()) == 0;
#elif GTEST_OS_FUCHSIA
const bool success = exe_str == "app";
#else