winmm/tests: Skip tests when running on non-english locale.
Nicolas Le Cam
niko.lecam at gmail.com
Sat Nov 7 01:35:38 CST 2009
--
Nicolas Le Cam
-------------- next part --------------
From 2b9d1e0e639752561bed8593a3a7b369cebb4f88 Mon Sep 17 00:00:00 2001
From: Nicolas Le Cam <niko.lecam at gmail.com>
Date: Fri, 6 Nov 2009 23:32:33 +0100
Subject: 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);
--
1.6.3.3
More information about the wine-patches
mailing list