Hans Leidekker : msi/tests: Show that a failing call to MsiGetSourcePath( SOURCEDIR) sets the SOURCEDIR property.

Alexandre Julliard julliard at winehq.org
Mon Feb 7 16:06:39 CST 2011


Module: wine
Branch: master
Commit: b2b4005fe44f4ee76e96bda2b3ab45b7a129f3fe
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=b2b4005fe44f4ee76e96bda2b3ab45b7a129f3fe

Author: Hans Leidekker <hans at codeweavers.com>
Date:   Mon Feb  7 09:40:33 2011 +0100

msi/tests: Show that a failing call to MsiGetSourcePath(SOURCEDIR) sets the SOURCEDIR property.

---

 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");
 




More information about the wine-cvs mailing list