From e0b4a3527b3862c3aaaac32237e3b43a4d6f8573 Mon Sep 17 00:00:00 2001 From: Akihiro Sagawa Date: Thu, 23 Mar 2017 00:00:59 +0900 Subject: [PATCH] version/tests: Check the translation resource before testing. Signed-off-by: Akihiro Sagawa Signed-off-by: Alexandre Julliard --- 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 c033aa9ffce..e49671eb105 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());