mirror of
https://github.com/reactos/reactos.git
synced 2025-07-27 16:23:51 +00:00
[VERSION_WINETEST]
* Sync with Wine 1.7.1. CORE-7469 svn path=/trunk/; revision=61202
This commit is contained in:
parent
78c2ec5eeb
commit
92be71c20b
5 changed files with 11 additions and 27 deletions
|
@ -1,16 +1,10 @@
|
||||||
|
|
||||||
add_definitions(
|
|
||||||
-D__ROS_LONG64__
|
|
||||||
-D_DLL -D__USE_CRTIMP)
|
|
||||||
|
|
||||||
list(APPEND SOURCE
|
list(APPEND SOURCE
|
||||||
info.c
|
info.c
|
||||||
install.c
|
install.c
|
||||||
version.rc
|
|
||||||
testlist.c)
|
testlist.c)
|
||||||
|
|
||||||
add_executable(version_winetest ${SOURCE})
|
add_executable(version_winetest ${SOURCE} version.rc)
|
||||||
target_link_libraries(version_winetest wine)
|
|
||||||
set_module_type(version_winetest win32cui)
|
set_module_type(version_winetest win32cui)
|
||||||
add_importlibs(version_winetest version msvcrt kernel32 ntdll)
|
add_importlibs(version_winetest version msvcrt kernel32 ntdll)
|
||||||
add_cd_file(TARGET version_winetest DESTINATION reactos/bin FOR all)
|
add_cd_file(TARGET version_winetest DESTINATION reactos/bin FOR all)
|
||||||
|
|
|
@ -178,7 +178,6 @@ static void test_info_size(void)
|
||||||
ok(retval == 0, "Expected 0, got %d\n", retval);
|
ok(retval == 0, "Expected 0, got %d\n", retval);
|
||||||
ok(hdl == 0, "Expected 0, got %d\n", hdl);
|
ok(hdl == 0, "Expected 0, got %d\n", hdl);
|
||||||
ok(GetLastError() == ERROR_RESOURCE_DATA_NOT_FOUND ||
|
ok(GetLastError() == ERROR_RESOURCE_DATA_NOT_FOUND ||
|
||||||
GetLastError() == ERROR_BAD_FORMAT || /* win9x */
|
|
||||||
GetLastError() == ERROR_SUCCESS, /* win2k */
|
GetLastError() == ERROR_SUCCESS, /* win2k */
|
||||||
"Expected ERROR_RESOURCE_DATA_NOT_FOUND, got %d\n", GetLastError());
|
"Expected ERROR_RESOURCE_DATA_NOT_FOUND, got %d\n", GetLastError());
|
||||||
|
|
||||||
|
@ -195,8 +194,6 @@ static void VersionDwordLong2String(DWORDLONG Version, LPSTR lpszVerString)
|
||||||
d = (WORD)(Version & 0xffff);
|
d = (WORD)(Version & 0xffff);
|
||||||
|
|
||||||
sprintf(lpszVerString, "%d.%d.%d.%d", a, b, c, d);
|
sprintf(lpszVerString, "%d.%d.%d.%d", a, b, c, d);
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void test_info(void)
|
static void test_info(void)
|
||||||
|
@ -341,12 +338,14 @@ static void test_32bit_win(void)
|
||||||
retvalW = GetFileVersionInfoSizeW( mypathW, &hdlW);
|
retvalW = GetFileVersionInfoSizeW( mypathW, &hdlW);
|
||||||
pVersionInfoW = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, retvalW );
|
pVersionInfoW = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, retvalW );
|
||||||
retW = GetFileVersionInfoW( mypathW, 0, retvalW, pVersionInfoW );
|
retW = GetFileVersionInfoW( mypathW, 0, retvalW, pVersionInfoW );
|
||||||
|
ok(retW, "GetFileVersionInfo failed: GetLastError = %u\n", GetLastError());
|
||||||
}
|
}
|
||||||
|
|
||||||
GetModuleFileNameA(NULL, mypathA, MAX_PATH);
|
GetModuleFileNameA(NULL, mypathA, MAX_PATH);
|
||||||
retvalA = GetFileVersionInfoSizeA( mypathA, &hdlA);
|
retvalA = GetFileVersionInfoSizeA( mypathA, &hdlA);
|
||||||
pVersionInfoA = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, retvalA );
|
pVersionInfoA = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, retvalA );
|
||||||
retA = GetFileVersionInfoA( mypathA, 0, retvalA, pVersionInfoA );
|
retA = GetFileVersionInfoA( mypathA, 0, retvalA, pVersionInfoA );
|
||||||
|
ok(retA, "GetFileVersionInfo failed: GetLastError = %u\n", GetLastError());
|
||||||
|
|
||||||
if (is_unicode_enabled)
|
if (is_unicode_enabled)
|
||||||
{
|
{
|
||||||
|
@ -411,7 +410,7 @@ static void test_32bit_win(void)
|
||||||
|
|
||||||
retW = VerQueryValueW( pVersionInfoW, rootW, (LPVOID *)&pBufW, &uiLengthW );
|
retW = VerQueryValueW( pVersionInfoW, rootW, (LPVOID *)&pBufW, &uiLengthW );
|
||||||
ok (retW, "VerQueryValueW failed: GetLastError = %u\n", GetLastError());
|
ok (retW, "VerQueryValueW failed: GetLastError = %u\n", GetLastError());
|
||||||
ok ( uiLengthA == sizeof(VS_FIXEDFILEINFO), "Size (%d) doesn't match the size of the VS_FIXEDFILEINFO struct\n", uiLengthA);
|
ok ( uiLengthW == sizeof(VS_FIXEDFILEINFO), "Size (%d) doesn't match the size of the VS_FIXEDFILEINFO struct\n", uiLengthW );
|
||||||
|
|
||||||
ok( uiLengthA == uiLengthW, "The size of VS_FIXEDFILEINFO should be the same for both A/W calls, it is (%d) vs. (%d)\n",
|
ok( uiLengthA == uiLengthW, "The size of VS_FIXEDFILEINFO should be the same for both A/W calls, it is (%d) vs. (%d)\n",
|
||||||
uiLengthA, uiLengthW);
|
uiLengthA, uiLengthW);
|
||||||
|
@ -499,12 +498,10 @@ static void test_VerQueryValue(void)
|
||||||
ret = VerQueryValue(ver, "String", (LPVOID*)&p, &len);
|
ret = VerQueryValue(ver, "String", (LPVOID*)&p, &len);
|
||||||
ok(!ret, "VerQueryValue should fail\n");
|
ok(!ret, "VerQueryValue should fail\n");
|
||||||
ok(GetLastError() == ERROR_RESOURCE_TYPE_NOT_FOUND ||
|
ok(GetLastError() == ERROR_RESOURCE_TYPE_NOT_FOUND ||
|
||||||
GetLastError() == 0xdeadbeef /* Win9x, NT4, W2K */,
|
GetLastError() == 0xdeadbeef /* NT4, W2K */,
|
||||||
"VerQueryValue returned %u\n", GetLastError());
|
"VerQueryValue returned %u\n", GetLastError());
|
||||||
ok(p == (char *)0xdeadbeef, "expected 0xdeadbeef got %p\n", p);
|
ok(p == (char *)0xdeadbeef, "expected 0xdeadbeef got %p\n", p);
|
||||||
ok(len == 0 ||
|
ok(len == 0, "expected 0 got %x\n", len);
|
||||||
len == 0xbeef, /* win9x */
|
|
||||||
"expected 0 got %x\n", len);
|
|
||||||
|
|
||||||
p = (char *)0xdeadbeef;
|
p = (char *)0xdeadbeef;
|
||||||
len = 0xdeadbeef;
|
len = 0xdeadbeef;
|
||||||
|
@ -568,12 +565,10 @@ todo_wine ok(len == 0, "VerQueryValue returned %u, expected 0\n", len);
|
||||||
ret = VerQueryValue(ver, buf, (LPVOID*)&p, &len);
|
ret = VerQueryValue(ver, buf, (LPVOID*)&p, &len);
|
||||||
ok(!ret, "VerQueryValue(%s) succeeded\n", buf);
|
ok(!ret, "VerQueryValue(%s) succeeded\n", buf);
|
||||||
ok(GetLastError() == ERROR_RESOURCE_TYPE_NOT_FOUND ||
|
ok(GetLastError() == ERROR_RESOURCE_TYPE_NOT_FOUND ||
|
||||||
GetLastError() == 0xdeadbeef /* Win9x, NT4, W2K */,
|
GetLastError() == 0xdeadbeef /* NT4, W2K */,
|
||||||
"VerQueryValue returned %u\n", GetLastError());
|
"VerQueryValue returned %u\n", GetLastError());
|
||||||
ok(p == (char *)0xdeadbeef, "expected 0xdeadbeef got %p\n", p);
|
ok(p == (char *)0xdeadbeef, "expected 0xdeadbeef got %p\n", p);
|
||||||
ok(len == 0 ||
|
ok(len == 0, "expected 0 or 0xbeef, got %x\n", len);
|
||||||
len == 0xbeef, /* win9x */
|
|
||||||
"expected 0 or 0xbeef, got %x\n", len);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
HeapFree(GetProcessHeap(), 0, ver);
|
HeapFree(GetProcessHeap(), 0, ver);
|
||||||
|
|
|
@ -89,7 +89,7 @@ static void test_find_file(void)
|
||||||
"got %d(%s) expected MAX_PATH\n", dwOut, outBuf);
|
"got %d(%s) expected MAX_PATH\n", dwOut, outBuf);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
todo_wine ok(0, "Got unexpected return value %x\n", ret);
|
ok(0, "Got unexpected return value %x\n", ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
dwCur=MAX_PATH;
|
dwCur=MAX_PATH;
|
||||||
|
@ -111,7 +111,7 @@ static void test_find_file(void)
|
||||||
"got %d(%s) expected MAX_PATH\n", dwOut, outBuf);
|
"got %d(%s) expected MAX_PATH\n", dwOut, outBuf);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
todo_wine ok(0, "Got unexpected return value %x\n", ret);
|
ok(0, "Got unexpected return value %x\n", ret);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +1,7 @@
|
||||||
/* Automatically generated file; DO NOT EDIT!! */
|
/* Automatically generated file; DO NOT EDIT!! */
|
||||||
|
|
||||||
#define WIN32_LEAN_AND_MEAN
|
|
||||||
#include <windows.h>
|
|
||||||
|
|
||||||
#define STANDALONE
|
#define STANDALONE
|
||||||
#include "wine/test.h"
|
#include <wine/test.h>
|
||||||
|
|
||||||
extern void func_info(void);
|
extern void func_info(void);
|
||||||
extern void func_install(void);
|
extern void func_install(void);
|
||||||
|
|
|
@ -16,8 +16,6 @@
|
||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "windef.h"
|
|
||||||
#include "winbase.h"
|
|
||||||
#include "winver.h"
|
#include "winver.h"
|
||||||
|
|
||||||
VS_VERSION_INFO VERSIONINFO
|
VS_VERSION_INFO VERSIONINFO
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue