From 5f5c662a673a6195db8455781671089c8d7c762f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20Zalewski?= Date: Sun, 22 Oct 2006 19:40:56 +0200 Subject: [PATCH] shlwapi/tests: Enable the locale-dependent tests if the delimiters are correct. --- dlls/shlwapi/tests/string.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/dlls/shlwapi/tests/string.c b/dlls/shlwapi/tests/string.c index b6dc9d37917..802811d9c71 100644 --- a/dlls/shlwapi/tests/string.c +++ b/dlls/shlwapi/tests/string.c @@ -720,8 +720,13 @@ static void test_SHUnicodeToUnicode(void) START_TEST(string) { + TCHAR thousandDelim[8]; + TCHAR decimalDelim[8]; CoInitialize(0); + GetLocaleInfo(GetUserDefaultLCID(), LOCALE_STHOUSAND, thousandDelim, 8); + GetLocaleInfo(GetUserDefaultLCID(), LOCALE_SDECIMAL, decimalDelim, 8); + hShlwapi = GetModuleHandleA("shlwapi"); if (!hShlwapi) return; @@ -738,15 +743,11 @@ START_TEST(string) test_StrToIntExA(); test_StrToIntExW(); test_StrDupA(); - if (0) + if (lstrcmp(thousandDelim, ",")==0 && lstrcmp(decimalDelim, ".")==0) { - /* this test fails on locales which do not use '.' as a decimal separator */ + /* these tests are locale-dependent */ test_StrFormatByteSize64A(); - - /* this test fails on locales which do not use '.' as a decimal separator */ test_StrFormatKBSizeA(); - - /* FIXME: Awaiting NLS fixes in kernel before these succeed */ test_StrFormatKBSizeW(); } test_StrFromTimeIntervalA();