msi/tests: Cleanup properly on Win9x.

This commit is contained in:
Paul Vriens 2010-11-14 19:39:42 +01:00 committed by Alexandre Julliard
parent dc2306de5a
commit e21115187e
1 changed files with 2 additions and 1 deletions

View File

@ -5896,7 +5896,6 @@ static void test_icon_table(void)
record = MsiCreateRecord(1); record = MsiCreateRecord(1);
res = MsiRecordSetStream(record, 1, "icon.ico"); res = MsiRecordSetStream(record, 1, "icon.ico");
ok(res == ERROR_SUCCESS, "Failed to add stream data to record: %d\n", res); ok(res == ERROR_SUCCESS, "Failed to add stream data to record: %d\n", res);
DeleteFile("icon.ico");
query = "INSERT INTO `Icon` (`Name`, `Data`) VALUES ('testicon', ?)"; query = "INSERT INTO `Icon` (`Name`, `Data`) VALUES ('testicon', ?)";
res = run_query(hdb, record, query); res = run_query(hdb, record, query);
@ -5904,6 +5903,8 @@ static void test_icon_table(void)
res = MsiCloseHandle(record); res = MsiCloseHandle(record);
ok(res == ERROR_SUCCESS, "Failed to close record handle: %d\n", res); ok(res == ERROR_SUCCESS, "Failed to close record handle: %d\n", res);
/* Delete the icon file after the handle is closed to make sure it's deleted on Win9x */
DeleteFileA("icon.ico");
res = MsiDatabaseCommit(hdb); res = MsiDatabaseCommit(hdb);
ok(res == ERROR_SUCCESS, "Failed to commit database: %d\n", res); ok(res == ERROR_SUCCESS, "Failed to commit database: %d\n", res);
res = MsiCloseHandle(hdb); res = MsiCloseHandle(hdb);