diff options
| author | Paolo Bonzini <pbonzini@redhat.com> | 2012-12-06 14:52:38 +0100 |
|---|---|---|
| committer | Paolo Bonzini <pbonzini@redhat.com> | 2012-12-06 20:30:33 +0100 |
| commit | f5ea2b3e225db1e1da80d10defd11ee3a0266f39 (patch) | |
| tree | f748b1a00475735313a78f26b257ce94591017bb /tests/testdatabase.c | |
| parent | 618223d5265f0a9299958b893e36c5d314f887f6 (diff) | |
testcases fix for gsf
Diffstat (limited to 'tests/testdatabase.c')
| -rw-r--r-- | tests/testdatabase.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/testdatabase.c b/tests/testdatabase.c index 6ab780f..a746da4 100644 --- a/tests/testdatabase.c +++ b/tests/testdatabase.c @@ -61,11 +61,11 @@ static void test_msidatabase(void) res = libmsi_database_open( msifile, msifile2, &hdb2 ); ok( res == LIBMSI_RESULT_SUCCESS , "Failed to open database\n" ); - ok( INVALID_FILE_ATTRIBUTES != GetFileAttributes( msifile2 ), "database should exist\n"); - res = libmsi_database_commit( hdb2 ); ok( res == LIBMSI_RESULT_SUCCESS , "Failed to commit database\n" ); + ok( INVALID_FILE_ATTRIBUTES != GetFileAttributes( msifile2 ), "database should exist\n"); + res = libmsi_unref( hdb2 ); ok( res == LIBMSI_RESULT_SUCCESS , "Failed to close database\n" ); @@ -104,16 +104,16 @@ static void test_msidatabase(void) ok( res == LIBMSI_RESULT_SUCCESS , "Failed to close database\n" ); ok( INVALID_FILE_ATTRIBUTES != GetFileAttributes( msifile ), "database should exist\n"); + DeleteFile( msifile ); + /* LIBMSI_DB_OPEN_CREATE deletes the database if MsiCommitDatabase isn't called */ res = libmsi_database_open( msifile, LIBMSI_DB_OPEN_CREATE, &hdb ); ok( res == LIBMSI_RESULT_SUCCESS , "Failed to open database\n" ); - ok( INVALID_FILE_ATTRIBUTES != GetFileAttributes( msifile ), "database should exist\n"); - res = libmsi_unref( hdb ); ok( res == LIBMSI_RESULT_SUCCESS , "Failed to close database\n" ); - ok( INVALID_FILE_ATTRIBUTES == GetFileAttributes( msifile ), "database should exist\n"); + ok( INVALID_FILE_ATTRIBUTES == GetFileAttributes( msifile ), "database should not exist\n"); res = libmsi_database_open( msifile, LIBMSI_DB_OPEN_CREATE, &hdb ); ok( res == LIBMSI_RESULT_SUCCESS , "Failed to open database\n" ); |
