Commit f271224f authored by Alexandre Julliard's avatar Alexandre Julliard

Authors: Mike McCormack <mike@codeweavers.com>, Aric Stewart <aric@codeweavers.com>

Add format record tests.
parent 9cd707da
Makefile
db.ok
format.ok
record.ok
suminfo.ok
testlist.c
......@@ -7,6 +7,7 @@ IMPORTS = msi kernel32
CTESTS = \
db.c \
format.c \
record.c \
suminfo.c
......
......@@ -25,82 +25,6 @@
#include "wine/test.h"
MSIHANDLE helper_createpackage()
{
MSIHANDLE hdb = 0;
CHAR szName[] = "C:\\mytest.msi";
UINT res;
CHAR szPackage[10];
MSIHANDLE hPackage;
MSIHANDLE suminfo;
DeleteFile(szName);
/* create an empty database */
res = MsiOpenDatabase(szName, MSIDBOPEN_CREATE, &hdb );
ok( res == ERROR_SUCCESS , "Failed to create database\n" );
res = MsiDatabaseCommit( hdb );
ok( res == ERROR_SUCCESS , "Failed to commit database\n" );
/* build summmary info */
res = MsiGetSummaryInformation(hdb, NULL, 7, &suminfo);
ok( res == ERROR_SUCCESS , "Failed to open summaryinfo\n" );
res = MsiSummaryInfoSetProperty(suminfo,2, VT_LPSTR, 0,NULL,
"Installation Database");
ok( res == ERROR_SUCCESS , "Failed to set summary info\n" );
res = MsiSummaryInfoSetProperty(suminfo,3, VT_LPSTR, 0,NULL,
"Installation Database");
ok( res == ERROR_SUCCESS , "Failed to set summary info\n" );
res = MsiSummaryInfoSetProperty(suminfo,4, VT_LPSTR, 0,NULL,
"Wine Hackers");
ok( res == ERROR_SUCCESS , "Failed to set summary info\n" );
res = MsiSummaryInfoSetProperty(suminfo,7, VT_LPSTR, 0,NULL,
";1033");
ok( res == ERROR_SUCCESS , "Failed to set summary info\n" );
res = MsiSummaryInfoSetProperty(suminfo,9, VT_LPSTR, 0,NULL,
"{913B8D18-FBB6-4CAC-A239-C74C11E3FA74}");
ok( res == ERROR_SUCCESS , "Failed to set summary info\n" );
res = MsiSummaryInfoSetProperty(suminfo, 14, VT_I4, 100, NULL, NULL);
ok( res == ERROR_SUCCESS , "Failed to set summary info\n" );
res = MsiSummaryInfoSetProperty(suminfo, 15, VT_I4, 0, NULL, NULL);
ok( res == ERROR_SUCCESS , "Failed to set summary info\n" );
res = MsiSummaryInfoPersist(suminfo);
ok( res == ERROR_SUCCESS , "Failed to make summary info persist\n" );
res = MsiCloseHandle( suminfo);
ok( res == ERROR_SUCCESS , "Failed to close suminfo\n" );
sprintf(szPackage,"#%li",(DWORD)hdb);
res = MsiOpenPackage(szPackage,&hPackage);
ok( res == ERROR_SUCCESS , "Failed to open package\n" );
res = MsiCloseHandle( hdb );
ok( res == ERROR_SUCCESS , "Failed to close database\n" );
return hPackage;
}
static void test_createpackage(void)
{
MSIHANDLE hPackage = 0;
UINT res;
hPackage = helper_createpackage();
ok ( hPackage != 0, " Failed to create package\n");
res = MsiCloseHandle( hPackage);
ok( res == ERROR_SUCCESS , "Failed to close package\n" );
}
static void test_msidatabase(void)
{
MSIHANDLE hdb = 0;
......@@ -433,5 +357,4 @@ START_TEST(db)
test_msiinsert();
test_msidecomposedesc();
test_msibadqueries();
test_createpackage();
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment