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

James Hawkins truiken at gmail.com
Tue Apr 21 16:37:15 CDT 2009


On Tue, Apr 21, 2009 at 2:30 PM, Nicolas Le Cam <niko.lecam at gmail.com> wrote:
> This patch adds a test to demonstrate current wrong behaviour in case of
> an empty path, it is basically there to validate last patch of the
> series that change relative path test behaviour (i.e. expected values),
> as it seems it was rejected because it wasn't backed up by a previous
> test.
>

+    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';
+    }


Please refactor this into a helper function.  A comment describing
exactly what is being tested and why this bit of code is needed would
be beneficial.

-- 
James Hawkins



More information about the wine-devel mailing list