Author: cwittich Date: Sun Dec 28 05:27:26 2008 New Revision: 38415
URL: http://svn.reactos.org/svn/reactos?rev=38415&view=rev Log: sync version winetest to wine 1.1.11
Modified: trunk/rostests/winetests/version/info.c trunk/rostests/winetests/version/install.c
Modified: trunk/rostests/winetests/version/info.c URL: http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/version/info.c?r... ============================================================================== --- trunk/rostests/winetests/version/info.c [iso-8859-1] (original) +++ trunk/rostests/winetests/version/info.c [iso-8859-1] Sun Dec 28 05:27:26 2008 @@ -167,7 +167,7 @@ } } else - trace("skipping GetModuleFileNameA(NULL,..) failed\n"); + trace("skipping GetSystemDirectoryA(mypath,..) failed\n");
create_file("test.txt");
@@ -247,6 +247,13 @@ ok (boolret, "GetFileVersionInfoA failed: GetLastError = %u\n", GetLastError()); 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()); @@ -286,6 +293,7 @@ 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 @@ 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 @@
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);
Modified: trunk/rostests/winetests/version/install.c URL: http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/version/install.... ============================================================================== --- trunk/rostests/winetests/version/install.c [iso-8859-1] (original) +++ trunk/rostests/winetests/version/install.c [iso-8859-1] Sun Dec 28 05:27:26 2008 @@ -165,7 +165,48 @@ } }
+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(); }