Module: wine Branch: master Commit: e0b4a3527b3862c3aaaac32237e3b43a4d6f8573 URL: http://source.winehq.org/git/wine.git/?a=commit;h=e0b4a3527b3862c3aaaac32237...
Author: Akihiro Sagawa sagawa.aki@gmail.com Date: Thu Mar 23 00:00:59 2017 +0900
version/tests: Check the translation resource before testing.
Signed-off-by: Akihiro Sagawa sagawa.aki@gmail.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/version/tests/info.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)
diff --git a/dlls/version/tests/info.c b/dlls/version/tests/info.c index c033aa9..e49671e 100644 --- a/dlls/version/tests/info.c +++ b/dlls/version/tests/info.c @@ -25,6 +25,7 @@ #include "winbase.h" #include "winerror.h" #include "winnls.h" +#include "winuser.h" #include "winver.h" #include "verrsrc.h" #include "wine/test.h" @@ -646,6 +647,17 @@ static void test_GetFileVersionInfoEx(void) }; char desc[MAX_PATH];
+ mod = GetModuleHandleA("kernel32.dll"); + assert(mod); + + if (!FindResourceExA(mod, (LPCSTR)RT_VERSION, (LPCSTR)VS_VERSION_INFO, lang) && + !FindResourceExA(mod, (LPCSTR)RT_VERSION, (LPCSTR)VS_VERSION_INFO, + MAKELANGID(PRIMARYLANGID(lang),SUBLANG_NEUTRAL))) + { + skip("Translation is not available\n"); + return; + } + size = GetFileVersionInfoSizeW(kernel32W, NULL); ok(size, "GetFileVersionInfoSize(kernel32) error %u\n", GetLastError());