msi: Fix a test that fails in win95.
authorJames Hawkins <jhawkins@codeweavers.com>
Wed, 1 Oct 2008 01:56:34 +0000 (20:56 -0500)
committerAlexandre Julliard <julliard@winehq.org>
Wed, 1 Oct 2008 16:41:34 +0000 (11:41 -0500)
dlls/msi/tests/msi.c

index 2b00314..aae8cfc 100644 (file)
@@ -435,6 +435,8 @@ static void test_MsiGetFileHash(void)
 
     for (i = 0; i < sizeof(hash_data) / sizeof(hash_data[0]); i++)
     {
+        int ret;
+
         create_file(name, hash_data[i].data, hash_data[i].size);
 
         memset(&hash, 0, sizeof(MSIFILEHASHINFO));
@@ -442,7 +444,11 @@ static void test_MsiGetFileHash(void)
 
         r = pMsiGetFileHashA(name, 0, &hash);
         ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
-        ok(!memcmp(&hash, &hash_data[i].hash, HASHSIZE), "Hash incorrect\n");
+
+        ret = memcmp(&hash, &hash_data[i].hash, HASHSIZE);
+        ok(ret == 0 ||
+           broken(ret != 0), /* win95 */
+           "Hash incorrect\n");
 
         DeleteFile(name);
     }