[2/2] msi/tests: Show that a failing call to MsiGetSourcePath(SOURCEDIR) sets the SOURCEDIR property.
Hans Leidekker
hans at codeweavers.com
Mon Feb 7 02:40:33 CST 2011
---
dlls/msi/tests/package.c | 17 +++++++++++++++++
1 files changed, 17 insertions(+), 0 deletions(-)
diff --git a/dlls/msi/tests/package.c b/dlls/msi/tests/package.c
index 706e925..cc7be1e 100644
--- a/dlls/msi/tests/package.c
+++ b/dlls/msi/tests/package.c
@@ -11939,6 +11939,23 @@ static void test_sourcedir(void)
ok(!lstrcmpA(path, ""), "Expected \"\", got \"%s\"\n", path);
ok(size == 0, "Expected 0, got %d\n", size);
+ size = MAX_PATH;
+ lstrcpyA(path, "kiwi");
+ r = MsiGetSourcePath(hpkg, "SOURCEDIR", path, &size);
+ ok(r == ERROR_DIRECTORY, "Expected ERROR_SUCCESS, got %d\n", r);
+ ok(!lstrcmpA(path, "kiwi"), "Expected \"kiwi\", got \"%s\"\n", path);
+ ok(size == MAX_PATH, "Expected %d, got %d\n", MAX_PATH, size);
+
+ /* SOURCEDIR after calling MsiGetSourcePath */
+ size = MAX_PATH;
+ lstrcpyA(path, "kiwi");
+ r = MsiGetProperty(hpkg, "SOURCEDIR", path, &size);
+ ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
+ todo_wine {
+ ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path);
+ ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size);
+ }
+
r = MsiDoAction(hpkg, "ResolveSource");
ok(r == ERROR_SUCCESS, "file cost failed\n");
--
1.7.1
More information about the wine-patches
mailing list