Author: akhaldi
Date: Fri Nov 28 19:22:34 2014
New Revision: 65512
URL:
http://svn.reactos.org/svn/reactos?rev=65512&view=rev
Log:
[KERNEL32_WINETEST] Addendum to r65511.
Modified:
trunk/rostests/winetests/kernel32/actctx.c
Modified: trunk/rostests/winetests/kernel32/actctx.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/kernel32/actctx…
==============================================================================
--- trunk/rostests/winetests/kernel32/actctx.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/kernel32/actctx.c [iso-8859-1] Fri Nov 28 19:22:34 2014
@@ -2167,6 +2167,65 @@
handle = pCreateActCtxA(&actctx);
ok(handle == INVALID_HANDLE_VALUE, "got handle %p\n", handle);
ok(GetLastError() == ERROR_RESOURCE_TYPE_NOT_FOUND, "got error %d\n",
GetLastError());
+
+ /* load manifest from lpAssemblyDirectory directory */
+ write_manifest("testdir.manifest", manifest1);
+ GetTempPathA(sizeof(path)/sizeof(path[0]), path);
+ SetCurrentDirectoryA(path);
+ strcat(path, "assembly_dir");
+ strcpy(dir, path);
+ strcat(path, "\\testdir.manifest");
+
+ memset(&actctx, 0, sizeof(actctx));
+ actctx.cbSize = sizeof(actctx);
+ actctx.dwFlags = ACTCTX_FLAG_ASSEMBLY_DIRECTORY_VALID;
+ actctx.lpSource = "testdir.manifest";
+ actctx.lpAssemblyDirectory = dir;
+
+ SetLastError(0xdeadbeef);
+ handle = pCreateActCtxA(&actctx);
+ ok(handle == INVALID_HANDLE_VALUE, "got handle %p\n", handle);
+ ok(GetLastError()==ERROR_PATH_NOT_FOUND ||
+ broken(GetLastError()==ERROR_FILE_NOT_FOUND) /* WinXP */,
+ "got error %d\n", GetLastError());
+
+ CreateDirectoryA(dir, NULL);
+ memset(&actctx, 0, sizeof(actctx));
+ actctx.cbSize = sizeof(actctx);
+ actctx.dwFlags = ACTCTX_FLAG_ASSEMBLY_DIRECTORY_VALID;
+ actctx.lpSource = "testdir.manifest";
+ actctx.lpAssemblyDirectory = dir;
+
+ SetLastError(0xdeadbeef);
+ handle = pCreateActCtxA(&actctx);
+ ok(handle == INVALID_HANDLE_VALUE, "got handle %p\n", handle);
+ ok(GetLastError() == ERROR_FILE_NOT_FOUND, "got error %d\n",
GetLastError());
+ SetCurrentDirectoryW(work_dir);
+
+ write_manifest("assembly_dir\\testdir.manifest", manifest1);
+ memset(&actctx, 0, sizeof(actctx));
+ actctx.cbSize = sizeof(actctx);
+ actctx.dwFlags = ACTCTX_FLAG_ASSEMBLY_DIRECTORY_VALID;
+ actctx.lpSource = "testdir.manifest";
+ actctx.lpAssemblyDirectory = dir;
+
+ handle = pCreateActCtxA(&actctx);
+ ok(handle != INVALID_HANDLE_VALUE, "got handle %p\n", handle);
+ pReleaseActCtx(handle);
+
+ memset(&actctx, 0, sizeof(actctx));
+ actctx.cbSize = sizeof(actctx);
+ actctx.dwFlags = ACTCTX_FLAG_ASSEMBLY_DIRECTORY_VALID;
+ actctx.lpSource = path;
+ actctx.lpAssemblyDirectory = dir;
+
+ handle = pCreateActCtxA(&actctx);
+ ok(handle != INVALID_HANDLE_VALUE, "got handle %p\n", handle);
+ pReleaseActCtx(handle);
+
+ delete_manifest_file("testdir.manifest");
+ delete_manifest_file("assembly_dir\\testdir.manifest");
+ RemoveDirectoryA(dir);
}
static BOOL init_funcs(void)