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
a28ebdf7
Commit
a28ebdf7
authored
Jun 12, 2006
by
Mike McCormack
Committed by
Alexandre Julliard
Jun 12, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Add some more test cases for INSERT.
parent
7f64332d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
0 deletions
+38
-0
db.c
dlls/msi/tests/db.c
+38
-0
No files found.
dlls/msi/tests/db.c
View file @
a28ebdf7
...
@@ -162,6 +162,44 @@ static void test_msiinsert(void)
...
@@ -162,6 +162,44 @@ static void test_msiinsert(void)
r
=
do_query
(
hdb
,
query
,
&
hrec
);
r
=
do_query
(
hdb
,
query
,
&
hrec
);
ok
(
r
==
ERROR_NO_MORE_ITEMS
,
"MsiViewFetch failed
\n
"
);
ok
(
r
==
ERROR_NO_MORE_ITEMS
,
"MsiViewFetch failed
\n
"
);
todo_wine
{
/* now try a few bad INSERT xqueries */
query
=
"INSERT INTO `phone` ( `id`, `name`, `number` )"
"VALUES(?, ?)"
;
r
=
MsiDatabaseOpenView
(
hdb
,
query
,
&
hview
);
ok
(
r
==
ERROR_BAD_QUERY_SYNTAX
,
"MsiDatabaseOpenView failed
\n
"
);
if
(
r
==
ERROR_SUCCESS
)
r
=
MsiCloseHandle
(
hview
);
}
/* construct a record to insert */
hrec
=
MsiCreateRecord
(
4
);
r
=
MsiRecordSetInteger
(
hrec
,
1
,
2
);
ok
(
r
==
ERROR_SUCCESS
,
"MsiRecordSetInteger failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
2
,
"Adam"
);
ok
(
r
==
ERROR_SUCCESS
,
"MsiRecordSetString failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
3
,
"96905305"
);
ok
(
r
==
ERROR_SUCCESS
,
"MsiRecordSetString failed
\n
"
);
/* insert another value, using a record and wildcards */
query
=
"INSERT INTO `phone` ( `id`, `name`, `number` )"
"VALUES(?, ?, ?)"
;
r
=
MsiDatabaseOpenView
(
hdb
,
query
,
&
hview
);
ok
(
r
==
ERROR_SUCCESS
,
"MsiDatabaseOpenView failed
\n
"
);
if
(
r
==
ERROR_SUCCESS
)
{
r
=
MsiViewExecute
(
hview
,
hrec
);
ok
(
r
==
ERROR_SUCCESS
,
"MsiViewExecute failed
\n
"
);
r
=
MsiViewClose
(
hview
);
ok
(
r
==
ERROR_SUCCESS
,
"MsiViewClose failed
\n
"
);
r
=
MsiCloseHandle
(
hview
);
ok
(
r
==
ERROR_SUCCESS
,
"MsiCloseHandle failed
\n
"
);
}
r
=
MsiCloseHandle
(
hrec
);
ok
(
r
==
ERROR_SUCCESS
,
"MsiCloseHandle failed
\n
"
);
r
=
MsiViewFetch
(
0
,
NULL
);
r
=
MsiViewFetch
(
0
,
NULL
);
ok
(
r
==
ERROR_INVALID_PARAMETER
,
"MsiViewFetch failed
\n
"
);
ok
(
r
==
ERROR_INVALID_PARAMETER
,
"MsiViewFetch failed
\n
"
);
...
...
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