Author: cwittich
Date: Sun May 24 13:07:56 2009
New Revision: 41094
URL:
http://svn.reactos.org/svn/reactos?rev=41094&view=rev
Log:
sync wintrust_winetest with wine 1.1.22
Modified:
trunk/rostests/winetests/wintrust/crypt.c
Modified: trunk/rostests/winetests/wintrust/crypt.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/wintrust/crypt.…
==============================================================================
--- trunk/rostests/winetests/wintrust/crypt.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/wintrust/crypt.c [iso-8859-1] Sun May 24 13:07:56 2009
@@ -373,6 +373,37 @@
DeleteFileA(temp);
}
+static void test_CryptCATOpen(void)
+{
+ HANDLE hcat;
+ char empty[MAX_PATH];
+ WCHAR emptyW[MAX_PATH];
+ HANDLE file;
+ BOOL ret;
+
+ SetLastError(0xdeadbeef);
+ hcat = pCryptCATOpen(NULL, 0, 0, 0, 0);
+ ok(hcat == INVALID_HANDLE_VALUE, "CryptCATOpen succeeded\n");
+ ok(GetLastError() == ERROR_INVALID_PARAMETER,
+ "Expected ERROR_INVALID_PARAMETER, got %08x\n", GetLastError());
+
+ if (!GetTempFileNameA(CURR_DIR, "cat", 0, empty)) return;
+
+ file = CreateFileA(empty, GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL);
+ ok(file != INVALID_HANDLE_VALUE, "CreateFileA failed %u\n",
GetLastError());
+ CloseHandle(file);
+ MultiByteToWideChar(CP_ACP, 0, empty, -1, emptyW, MAX_PATH);
+
+ hcat = pCryptCATOpen(emptyW, 0, 0, 0, 0);
+ todo_wine
+ ok(hcat != INVALID_HANDLE_VALUE, "Expected a correct handle\n");
+
+ ret = pCryptCATClose(hcat);
+ todo_wine
+ ok(ret, "CryptCATClose failed\n");
+ DeleteFileA(empty);
+}
+
static DWORD error_area;
static DWORD local_error;
@@ -615,9 +646,6 @@
catalog[0] = 0;
}
- hcat = pCryptCATOpen(NULL, 0, 0, 0, 0);
- ok(hcat == INVALID_HANDLE_VALUE, "CryptCATOpen succeeded\n");
-
hcat = pCryptCATOpen(catalogW, 0, 0, 0, 0);
if (hcat == INVALID_HANDLE_VALUE && members == 0)
{
@@ -1106,6 +1134,7 @@
test_context();
test_calchash();
+ test_CryptCATOpen();
/* Parameter checking only */
test_CryptCATCDF_params();
/* Test the parsing of a cdf file */