msi/tests: Add empty dir test for the DrLocator part of the AppSearch action.

Nicolas Le Cam niko.lecam at gmail.com
Mon Apr 20 19:09:24 CDT 2009


---
 dlls/msi/tests/package.c |   31 +++++++++++++++++++++++++++++--
 1 files changed, 29 insertions(+), 2 deletions(-)

diff --git a/dlls/msi/tests/package.c b/dlls/msi/tests/package.c
index c5c3b67..d55895d 100644
--- a/dlls/msi/tests/package.c
+++ b/dlls/msi/tests/package.c
@@ -8562,8 +8562,8 @@ static void test_appsearch_drlocator(void)
     CHAR prop[MAX_PATH];
     BOOL version;
     LPCSTR str;
-    DWORD size;
-    UINT r;
+    DWORD size, drives;
+    UINT r, i;
 
     version = TRUE;
     if (!create_file_with_version("test.dll", MAKELONG(2, 1), MAKELONG(4, 3)))
@@ -8617,6 +8617,9 @@ static void test_appsearch_drlocator(void)
     r = add_appsearch_entry(hdb, "'SIGPROP10', 'NewSignature10'");
     ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
 
+    r = add_appsearch_entry(hdb, "'SIGPROP11', 'NewSignature11'");
+    ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
+
     r = create_drlocator_table(hdb);
     ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
 
@@ -8670,6 +8673,11 @@ static void test_appsearch_drlocator(void)
     r = add_drlocator_entry(hdb, path);
     ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
 
+    /* no parent, relative empty path, depth 0, no signature */
+    sprintf(path, "'NewSignature11', '', '', 0");
+    r = add_drlocator_entry(hdb, path);
+    ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
+
     r = create_signature_table(hdb);
     ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
 
@@ -8770,6 +8778,25 @@ static void test_appsearch_drlocator(void)
         ok(!lstrcmpA(prop, ""), "Expected \"\", got \"%s\"\n", prop);
     }
 
+    size = MAX_PATH;
+    drives = GetLogicalDrives();
+    lstrcpyA(path, "A:\\");
+    for (i = 0; i < 26; i++)
+    {
+        if ((drives & (1 << i)))
+        {
+            path[0] = 'A' + i;
+
+            if (GetDriveType(path) == DRIVE_FIXED)
+                break;
+        }
+        path[0] = '\0';
+    }
+    r = MsiGetPropertyA(hpkg, "SIGPROP11", prop, &size);
+    ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
+    todo_wine
+    ok(!lstrcmpA(prop, path), "Expected \"%s\", got \"%s\"\n", path, prop);
+
     DeleteFileA("FileName1");
     DeleteFileA("FileName3.dll");
     DeleteFileA("FileName4.dll");
-- 
1.6.0.4


--=-LDAUCReKo7B2SKAm/OlZ--




More information about the wine-patches mailing list