Index: source/ps/tests/test_CStr.h =================================================================== --- source/ps/tests/test_CStr.h +++ source/ps/tests/test_CStr.h @@ -132,7 +132,7 @@ TS_ASSERT_EQUALS(str2.ToLong(), 0); TS_ASSERT_EQUALS(str2.ToULong(), 0u); - CStr8 str3("3bogus"); + CStr8 str3("3 bogus"); TS_ASSERT_EQUALS(str3.ToFloat(), 3.0f); TS_ASSERT_EQUALS(str3.ToDouble(), 3.0); TS_ASSERT_EQUALS(str3.ToInt(), 3); Index: source/ps/tests/test_cppformat.h =================================================================== --- source/ps/tests/test_cppformat.h +++ source/ps/tests/test_cppformat.h @@ -24,6 +24,10 @@ public: void test_basic() { + // Make test behave independent of current host locale + char* old = setlocale(LC_ALL, NULL); + setlocale(LC_ALL, "en_US.UTF-8"); + TS_ASSERT_EQUALS(fmt::sprintf("abc"), "abc"); TS_ASSERT_EQUALS(fmt::sprintf("%d", 123), "123"); @@ -54,5 +58,7 @@ TS_ASSERT_EQUALS(fmt::sprintf("T%sT", (const char*)NULL), "T(null)T"); TS_ASSERT_EQUALS(fmt::sprintf("T%pT", (void*)0x1234), "T0x1234T"); + + setlocale(LC_ALL, old); } };