[prev in list] [next in list] [prev in thread] [next in thread]
List: wine-devel
Subject: [PATCH 1/2] Add simple test for SetThreadUILanguage
From: Louis Lenders <xerox.xerox2000x () gmail ! com>
Date: 2018-03-31 9:35:06
Message-ID: CAGyeDwTS0bypcOSGFaG84x0UC7vmaw3P==+y7wqW77540e38Kw () mail ! gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
[Attachment #5 (text/html)]
<div dir="ltr"><br></div>
["0001-kernel32-tests-add-simple-test-for-SetThreadUILangua.patch" (text/x-patch)]
From 86938f49238091ec627b617542f231959d3156ee Mon Sep 17 00:00:00 2001
From: Louis Lenders <xerox.xerox2000x@gmail.com>
Date: Sat, 31 Mar 2018 11:24:53 +0200
Subject: [PATCH 1/2] kernel32/tests: add simple test for SetThreadUILanguage
Signed-off-by: Louis Lenders <xerox.xerox2000x@gmail.com>
---
dlls/kernel32/tests/locale.c | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/dlls/kernel32/tests/locale.c b/dlls/kernel32/tests/locale.c
index efb4231..ac63ba2 100644
--- a/dlls/kernel32/tests/locale.c
+++ b/dlls/kernel32/tests/locale.c
@@ -104,6 +104,8 @@ static BOOL (WINAPI *pGetUserPreferredUILanguages)(DWORD, ULONG*, \
WCHAR*, ULONG* static WCHAR (WINAPI *pRtlUpcaseUnicodeChar)(WCHAR);
static INT (WINAPI *pGetNumberFormatEx)(LPCWSTR, DWORD, LPCWSTR, const NUMBERFMTW *, \
LPWSTR, int); static INT (WINAPI *pFindNLSStringEx)(LPCWSTR, DWORD, LPCWSTR, INT, \
LPCWSTR, INT, LPINT, LPNLSVERSIONINFO, LPVOID, LPARAM); +static LANGID (WINAPI \
*pSetThreadUILanguage)(LANGID); +static LANGID (WINAPI *pGetThreadUILanguage)(VOID);
static void InitFunctionPointers(void)
{
@@ -137,6 +139,8 @@ static void InitFunctionPointers(void)
X(GetUserPreferredUILanguages);
X(GetNumberFormatEx);
X(FindNLSStringEx);
+ X(SetThreadUILanguage);
+ X(GetThreadUILanguage);
mod = GetModuleHandleA("ntdll");
X(RtlUpcaseUnicodeChar);
@@ -5443,6 +5447,28 @@ static void test_FindNLSStringEx(void)
}
}
+static void test_SetThreadUILanguage(void)
+{
+ LANGID res;
+
+ if (!pGetThreadUILanguage)
+ {
+ win_skip("GetThreadUILanguage isn't implemented, skipping \
SetThreadUILanguage tests for version < Vista\n"); + return; /* BTW \
SetThreadUILanguage is present on winxp/2003 but doesn`t set the LANGID anyway when \
tested */ + }
+
+ res = pSetThreadUILanguage(0);
+ todo_wine ok(res == pGetThreadUILanguage(), "expected %d got %d\n", \
pGetThreadUILanguage(), res); +
+ res = pSetThreadUILanguage(MAKELANGID(LANG_DUTCH, SUBLANG_DUTCH_BELGIAN));
+ ok(res == MAKELANGID(LANG_DUTCH, SUBLANG_DUTCH_BELGIAN),
+ "expected %d got %d\n", MAKELANGID(LANG_DUTCH, SUBLANG_DUTCH_BELGIAN), res);
+
+ res = pSetThreadUILanguage(0); /* corner-case??? Worth testing/fixing? */
+ todo_wine ok(res == MAKELANGID(LANG_DUTCH, SUBLANG_DUTCH_BELGIAN),
+ "expected %d got %d\n", MAKELANGID(LANG_DUTCH, SUBLANG_DUTCH_BELGIAN), res);
+}
+
START_TEST(locale)
{
InitFunctionPointers();
@@ -5490,6 +5516,7 @@ START_TEST(locale)
test_GetThreadPreferredUILanguages();
test_GetUserPreferredUILanguages();
test_FindNLSStringEx();
+ test_SetThreadUILanguage();
/* this requires collation table patch to make it MS compatible */
if (0) test_sorting();
}
--
2.7.4
[Attachment #7 (text/plain)]
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic