sync version winetest to wine 1.1.11

svn path=/trunk/; revision=38415
This commit is contained in:
Christoph von Wittich 2008-12-28 11:27:26 +00:00
parent 7222acc172
commit 1eee77ac31
2 changed files with 60 additions and 2 deletions

View file

@ -167,7 +167,7 @@ static void test_info_size(void)
}
}
else
trace("skipping GetModuleFileNameA(NULL,..) failed\n");
trace("skipping GetSystemDirectoryA(mypath,..) failed\n");
create_file("test.txt");
@ -248,6 +248,13 @@ static void test_info(void)
if (!boolret)
goto cleanup;
boolret = VerQueryValueA( pVersionInfo, NULL, (LPVOID *)&pFixedVersionInfo, &uiLength );
ok (boolret || GetLastError() == NO_ERROR /* Win98 */,
"VerQueryValueA failed: GetLastError = %u\n", GetLastError());
boolret = VerQueryValueA( pVersionInfo, "", (LPVOID *)&pFixedVersionInfo, &uiLength );
ok (boolret, "VerQueryValueA failed: GetLastError = %u\n", GetLastError());
boolret = VerQueryValueA( pVersionInfo, backslash, (LPVOID *)&pFixedVersionInfo, &uiLength );
ok (boolret, "VerQueryValueA failed: GetLastError = %u\n", GetLastError());
if (!boolret)
@ -286,6 +293,7 @@ static void test_32bit_win(void)
WCHAR mypathW[MAX_PATH];
char rootA[] = "\\";
WCHAR rootW[] = { '\\', 0 };
WCHAR emptyW[] = { 0 };
char varfileinfoA[] = "\\VarFileInfo\\Translation";
WCHAR varfileinfoW[] = { '\\','V','a','r','F','i','l','e','I','n','f','o',
'\\','T','r','a','n','s','l','a','t','i','o','n', 0 };
@ -324,7 +332,7 @@ static void test_32bit_win(void)
GetModuleFileNameW(NULL, mypathW, MAX_PATH);
if (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)
{
trace("GetModuleFileNameW not existing on this platform, skipping comparison between A- and W-calls\n");
win_skip("GetModuleFileNameW not existing on this platform, skipping comparison between A- and W-calls\n");
is_unicode_enabled = FALSE;
}
@ -392,6 +400,15 @@ static void test_32bit_win(void)
if (is_unicode_enabled)
{
if(0)
{ /* This causes Vista and w2k8 to crash */
retW = VerQueryValueW( pVersionInfoW, NULL, (LPVOID *)&pBufW, &uiLengthW );
ok (retW, "VerQueryValueW failed: GetLastError = %u\n", GetLastError());
}
retW = VerQueryValueW( pVersionInfoW, emptyW, (LPVOID *)&pBufW, &uiLengthW );
ok (retW, "VerQueryValueW failed: GetLastError = %u\n", GetLastError());
retW = VerQueryValueW( pVersionInfoW, rootW, (LPVOID *)&pBufW, &uiLengthW );
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);

View file

@ -165,7 +165,48 @@ static void test_find_file(void)
}
}
static void test_install_file(void)
{
CHAR tmpname[MAX_PATH];
UINT size = MAX_PATH;
DWORD rc;
static const CHAR szSrcFileName[] = "nofile.txt";
static const CHAR szDestFileName[] = "nofile2.txt";
static const CHAR szSrcDir[] = "D:\\oes\\not\\exist";
static const CHAR szDestDir[] = "D:\\oes\\not\\exist\\either";
static const CHAR szCurDir[] = "C:\\";
/* testing Invalid Parameters */
memset(tmpname,0,sizeof(tmpname));
rc = VerInstallFileA(0x0, NULL, NULL, NULL, NULL, NULL, tmpname, &size);
ok (rc == 0x10000 && tmpname[0]==0," expected return 0x10000 and no tempname, got %08x/\'%s\'\n",rc,tmpname);
memset(tmpname,0,sizeof(tmpname));
size = MAX_PATH;
rc = VerInstallFileA(0x0, szSrcFileName, NULL, NULL, NULL, NULL, tmpname, &size);
ok (rc == 0x10000 && tmpname[0]==0," expected return 0x10000 and no tempname, got %08x/\'%s\'\n",rc,tmpname);
memset(tmpname,0,sizeof(tmpname));
size = MAX_PATH;
rc = VerInstallFileA(0x0, szSrcFileName, szDestFileName, NULL, NULL, NULL, tmpname, &size);
ok (rc == 0x10000 && tmpname[0]==0," expected return 0x10000 and no tempname, got %08x/\'%s\'\n",rc,tmpname);
memset(tmpname,0,sizeof(tmpname));
size = MAX_PATH;
rc = VerInstallFileA(0x0, szSrcFileName, szDestFileName, szSrcDir, NULL, NULL, tmpname, &size);
ok (rc == 0x10000 && tmpname[0]==0," expected return 0x10000 and no tempname, got %08x/\'%s\'\n",rc,tmpname);
/* Source file does not exist*/
memset(tmpname,0,sizeof(tmpname));
size = MAX_PATH;
rc = VerInstallFileA(0x0, szSrcFileName, szDestFileName, szSrcDir, szDestDir, NULL, tmpname, &size);
ok (rc == 0x10000 && tmpname[0]==0," expected return 0x10000 and no tempname, got %08x/\'%s\'\n",rc,tmpname);
memset(tmpname,0,sizeof(tmpname));
size = MAX_PATH;
rc = VerInstallFileA(0x0, szSrcFileName, szDestFileName, szSrcDir, szDestDir, szCurDir, tmpname, &size);
ok (rc == 0x10000 && tmpname[0]==0," expected return 0x10000 and no tempname, got %08x/\'%s\'\n",rc,tmpname);
}
START_TEST(install)
{
test_find_file();
test_install_file();
}