Nicolas Le Cam : winmm/tests: Skip tests when running on non-english locale .
Module: wine Branch: master Commit: 556b1ca7edf89a8677b2fad963c66284126d2ea8 URL: http://source.winehq.org/git/wine.git/?a=commit;h=556b1ca7edf89a8677b2fad963... Author: Nicolas Le Cam <niko.lecam(a)gmail.com> Date: Fri Nov 6 23:32:33 2009 +0100 winmm/tests: Skip tests when running on non-english locale. --- dlls/winmm/tests/mci.c | 28 +++++++++++++++++++++------- 1 files changed, 21 insertions(+), 7 deletions(-) diff --git a/dlls/winmm/tests/mci.c b/dlls/winmm/tests/mci.c index 6b1ecb7..5366810 100644 --- a/dlls/winmm/tests/mci.c +++ b/dlls/winmm/tests/mci.c @@ -163,9 +163,16 @@ static void test_openCloseWAVE(HWND hwnd) ok(!err,"mci %s returned error: %d\n", command_open, err); ok(!strcmp(buf,"1"), "mci open deviceId: %s, expected 1\n", buf); - err = mciSendString("status mysound time format", buf, sizeof(buf), hwnd); - ok(!err,"mci status time format returned error: %d\n", err); - ok(!strcmp(buf,"milliseconds"), "mci status time format: %s\n", buf); + if (PRIMARYLANGID(LANGIDFROMLCID(GetThreadLocale())) != LANG_ENGLISH) + { + skip("Non-english locale (test with hardcoded 'milliseconds')\n"); + } + else + { + err = mciSendString("status mysound time format", buf, sizeof(buf), hwnd); + ok(!err,"mci status time format returned error: %d\n", err); + ok(!strcmp(buf,"milliseconds"), "mci status time format: %s\n", buf); + } err = mciSendString(command_close_my, NULL, 0, hwnd); ok(!err,"mci %s returned error: %d\n", command_close_my, err); @@ -376,10 +383,17 @@ static void test_asyncWAVE(HWND hwnd) * will be 333ms, 667ms etc. at best. */ Sleep(100); /* milliseconds */ - buf[0]=0; - err = mciSendString("status mysound time format", buf, sizeof(buf), hwnd); - ok(!err,"mci status time format returned error: %d\n", err); - ok(!strcmp(buf,"milliseconds"), "mci status time format: %s\n", buf); + if (PRIMARYLANGID(LANGIDFROMLCID(GetThreadLocale())) != LANG_ENGLISH) + { + skip("Non-english locale (test with hardcoded 'milliseconds')\n"); + } + else + { + buf[0]=0; + err = mciSendString("status mysound time format", buf, sizeof(buf), hwnd); + ok(!err,"mci status time format returned error: %d\n", err); + ok(!strcmp(buf,"milliseconds"), "mci status time format: %s\n", buf); + } buf[0]=0; err = mciSendString("status mysound position", buf, sizeof(buf), hwnd);
participants (1)
-
Alexandre Julliard