Commit 23b291a6 authored by Mike McCormack's avatar Mike McCormack Committed by Alexandre Julliard

Add a simple test case for MSI databases.

parent 05903434
......@@ -1588,6 +1588,7 @@ dlls/mscms/tests/Makefile
dlls/msdmo/Makefile
dlls/mshtml/Makefile
dlls/msi/Makefile
dlls/msi/tests/Makefile
dlls/msimg32/Makefile
dlls/msisys/Makefile
dlls/msnet32/Makefile
......
......@@ -31,6 +31,8 @@ RC_SRCS = version.rc
EXTRA_SRCS = sql.y cond.y
EXTRA_OBJS = sql.tab.o cond.tab.o
SUBDIRS = tests
@MAKE_DLL_RULES@
sql.tab.c sql.tab.h: sql.y
......
Makefile
db.ok
testlist.c
TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ../../..
SRCDIR = @srcdir@
VPATH = @srcdir@
TESTDLL = msi.dll
IMPORTS = msi kernel32
CTESTS = \
db.c
@MAKE_TEST_RULES@
### Dependencies:
/*
* Copyright (C) 2005 Mike McCormack for Codeweavers
*
* A test program for MSI database files.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <windows.h>
#include <msi.h>
#include <msiquery.h>
#include "wine/test.h"
START_TEST(db)
{
MSIHANDLE hdb = 0;
CHAR szName[] = "C:\\mytest.msi";
UINT res;
DeleteFile(szName);
/* create an empty database */
res = MsiOpenDatabase(szName, MSIDBOPEN_CREATE, &hdb );
ok( res == ERROR_SUCCESS , "Failed to create database" );
res = MsiDatabaseCommit( hdb );
ok( res == ERROR_SUCCESS , "Failed to commit database" );
res = MsiCloseHandle( hdb );
ok( res == ERROR_SUCCESS , "Failed to close database" );
}
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