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>
This commit is contained in:
Akihiro Sagawa 2017-03-23 00:00:59 +09:00 committed by Alexandre Julliard
parent 52931c7523
commit e0b4a3527b
1 changed files with 12 additions and 0 deletions

View File

@ -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());