riched20/tests: Skip some tests on non-English platforms.

This commit is contained in:
Greg Geldorp 2011-01-19 12:54:32 +01:00 committed by Alexandre Julliard
parent 3f153007ba
commit bee48efdce
1 changed files with 8 additions and 2 deletions

View File

@ -4822,6 +4822,7 @@ static void test_EM_FORMATRANGE(void)
HDC hdc; HDC hdc;
HWND hwndRichEdit = new_richedit(NULL); HWND hwndRichEdit = new_richedit(NULL);
FORMATRANGE fr; FORMATRANGE fr;
BOOL skip_non_english;
static const struct { static const struct {
const char *string; /* The string */ const char *string; /* The string */
int first; /* First 'pagebreak', 0 for don't care */ int first; /* First 'pagebreak', 0 for don't care */
@ -4834,6 +4835,10 @@ static void test_EM_FORMATRANGE(void)
{"WINE\r\n\r\nwine\r\nwine", 5, 6} {"WINE\r\n\r\nwine\r\nwine", 5, 6}
}; };
skip_non_english = (PRIMARYLANGID(GetUserDefaultLangID()) != LANG_ENGLISH);
if (skip_non_english)
skip("Skipping some tests on non-English platform\n");
hdc = GetDC(hwndRichEdit); hdc = GetDC(hwndRichEdit);
ok(hdc != NULL, "Could not get HDC\n"); ok(hdc != NULL, "Could not get HDC\n");
@ -4895,6 +4900,7 @@ static void test_EM_FORMATRANGE(void)
fr.chrg.cpMax = -1; fr.chrg.cpMax = -1;
r = SendMessage(hwndRichEdit, EM_FORMATRANGE, TRUE, (LPARAM) &fr); r = SendMessage(hwndRichEdit, EM_FORMATRANGE, TRUE, (LPARAM) &fr);
todo_wine { todo_wine {
if (! skip_non_english)
ok(fr.rc.bottom == (stringsize.cy * tpp_y), "Expected bottom to be %d, got %d\n", (stringsize.cy * tpp_y), fr.rc.bottom); ok(fr.rc.bottom == (stringsize.cy * tpp_y), "Expected bottom to be %d, got %d\n", (stringsize.cy * tpp_y), fr.rc.bottom);
} }
if (fmtstrings[i].first) if (fmtstrings[i].first)
@ -4911,7 +4917,7 @@ static void test_EM_FORMATRANGE(void)
todo_wine { todo_wine {
ok(r == fmtstrings[i].second, "Expected %d, got %d\n", fmtstrings[i].second, r); ok(r == fmtstrings[i].second, "Expected %d, got %d\n", fmtstrings[i].second, r);
} }
else else if (! skip_non_english)
ok (r < len, "Expected < %d, got %d\n", len, r); ok (r < len, "Expected < %d, got %d\n", len, r);
/* There is at least on more page, but we don't care */ /* There is at least on more page, but we don't care */