This is for testing the implementation for Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56915
-- v15: bcp47langs: Add tests for GetUserLanguages.
From: Vijay Kiran Kamuju infyquest@gmail.com
Signed-off-by: Vijay Kiran Kamuju infyquest@gmail.com --- dlls/bcp47langs/tests/Makefile.in | 2 +- dlls/bcp47langs/tests/bcp47langs.c | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-)
diff --git a/dlls/bcp47langs/tests/Makefile.in b/dlls/bcp47langs/tests/Makefile.in index 3c2cee465cf..43db21a1c47 100644 --- a/dlls/bcp47langs/tests/Makefile.in +++ b/dlls/bcp47langs/tests/Makefile.in @@ -1,5 +1,5 @@ TESTDLL = bcp47langs.dll -IMPORTS = bcp47langs +IMPORTS = combase bcp47langs
SOURCES = \ bcp47langs.c diff --git a/dlls/bcp47langs/tests/bcp47langs.c b/dlls/bcp47langs/tests/bcp47langs.c index 7cdf3ed8ef4..0505779b560 100644 --- a/dlls/bcp47langs/tests/bcp47langs.c +++ b/dlls/bcp47langs/tests/bcp47langs.c @@ -18,9 +18,13 @@
#define WIN32_LEAN_AND_MEAN #include <windows.h> + +#include "winstring.h" + #include "wine/test.h"
HRESULT WINAPI GetFontFallbackLanguageList(const WCHAR *, size_t, WCHAR *, size_t *); +DWORD WINAPI GetUserLanguages(WCHAR, HSTRING *);
static void test_GetFontFallbackLanguageList(void) { @@ -63,7 +67,22 @@ static void test_GetFontFallbackLanguageList(void) ok(required_size >= (wcslen(L"en-US") + 1), "Got unexpected size %Iu.\n", required_size); }
+static void test_GetUserLanguages(void) +{ + DWORD hr; + HSTRING usrlangs; + + hr = GetUserLanguages('|', &usrlangs); + todo_wine ok(hr == 0, "got %ld.\n", hr); + WindowsDeleteString(usrlangs); + + hr = GetUserLanguages('|', &usrlangs); + todo_wine ok(hr == 0, "got %ld.\n", hr); + WindowsDeleteString(usrlangs); +} + START_TEST(bcp47langs) { test_GetFontFallbackLanguageList(); + test_GetUserLanguages(); }