Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
419a8a24
Commit
419a8a24
authored
Jan 08, 2008
by
James Hawkins
Committed by
Alexandre Julliard
Jan 09, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Test committing a table with a removed row.
parent
ce8199a4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
69 additions
and
0 deletions
+69
-0
db.c
dlls/msi/tests/db.c
+69
-0
No files found.
dlls/msi/tests/db.c
View file @
419a8a24
...
...
@@ -4991,6 +4991,74 @@ static void test_viewmodify_delete_temporary(void)
DeleteFileA
(
msifile
);
}
static
void
test_msidatabasecommit
()
{
MSIHANDLE
hdb
,
hview
,
hrec
;
const
char
*
query
;
char
buf
[
MAX_PATH
];
UINT
r
;
DWORD
size
;
DeleteFile
(
msifile
);
r
=
MsiOpenDatabase
(
msifile
,
MSIDBOPEN_CREATE
,
&
hdb
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
query
=
"CREATE TABLE `Table` ( `A` CHAR(72) NOT NULL PRIMARY KEY `A` )"
;
r
=
run_query
(
hdb
,
0
,
query
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
query
=
"INSERT INTO `Table` (`A`) VALUES ('one')"
;
r
=
run_query
(
hdb
,
0
,
query
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
query
=
"INSERT INTO `Table` (`A`) VALUES ('two')"
;
r
=
run_query
(
hdb
,
0
,
query
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
query
=
"DELETE FROM `Table` WHERE `A` = 'one'"
;
r
=
run_query
(
hdb
,
0
,
query
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
r
=
MsiDatabaseCommit
(
hdb
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
MsiCloseHandle
(
hdb
);
r
=
MsiOpenDatabase
(
msifile
,
MSIDBOPEN_READONLY
,
&
hdb
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
query
=
"SELECT * FROM `Table`"
;
r
=
MsiDatabaseOpenView
(
hdb
,
query
,
&
hview
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
r
=
MsiViewExecute
(
hview
,
0
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
r
=
MsiViewFetch
(
hview
,
&
hrec
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
size
=
MAX_PATH
;
r
=
MsiRecordGetStringA
(
hrec
,
1
,
buf
,
&
size
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
todo_wine
{
ok
(
!
lstrcmpA
(
buf
,
"two"
),
"Expected two, got %s
\n
"
,
buf
);
}
MsiCloseHandle
(
hrec
);
r
=
MsiViewFetch
(
hview
,
&
hrec
);
todo_wine
{
ok
(
r
==
ERROR_NO_MORE_ITEMS
,
"Expected ERROR_NO_MORE_ITEMS, got %d
\n
"
,
r
);
}
MsiViewClose
(
hview
);
MsiCloseHandle
(
hview
);
MsiCloseHandle
(
hdb
);
DeleteFileA
(
msifile
);
}
START_TEST
(
db
)
{
test_msidatabase
();
...
...
@@ -5021,4 +5089,5 @@ START_TEST(db)
test_defaultdatabase
();
test_order
();
test_viewmodify_delete_temporary
();
test_msidatabasecommit
();
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment