diff --git a/source/scriptinterface/tests/test_ScriptConversions.h b/source/scriptinterface/tests/test_ScriptConversions.h index f91778b7f3..1faa35659f 100644 --- a/source/scriptinterface/tests/test_ScriptConversions.h +++ b/source/scriptinterface/tests/test_ScriptConversions.h @@ -159,9 +159,10 @@ public: roundtrip(L"", "\"\""); roundtrip(L"test", "\"test\""); - roundtrip(L"тест", "\"\\u0442\\u0435\\u0441\\u0442\""); + // Windows has two byte wchar_t. We test for this explicitly since we can catch more possible issues this way. + roundtrip(L"тест", sizeof(wchar_t) == 2 ? "\"\\xD1\\u201A\\xD0\\xB5\\xD1\\x81\\xD1\\u201A\"" : "\"\\u0442\\u0435\\u0441\\u0442\""); roundtrip(w1, "\"t\\x00st\""); - roundtrip(w2, "\"\\u0442\\x00\\u0441\\u0442\""); + roundtrip(w2, sizeof(wchar_t) == 2 ? "\"\\xD1\\x00\\xD0\\xB5\\xD1\\x81\\xD1\\u201A\"" : "\"\\u0442\\x00\\u0441\\u0442\""); convert_to("", "\"\""); convert_to("test", "\"test\"");