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
a807e86d
Commit
a807e86d
authored
May 26, 2009
by
Hib Eris
Committed by
Alexandre Julliard
May 27, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi/tests: Add test for merging tables with string primary keys.
parent
086fcfc1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
0 deletions
+46
-0
db.c
dlls/msi/tests/db.c
+46
-0
No files found.
dlls/msi/tests/db.c
View file @
a807e86d
...
...
@@ -6944,6 +6944,52 @@ static void test_dbmerge(void)
r
=
run_query
(
hdb
,
0
,
query
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
query
=
"DROP TABLE `One`"
;
r
=
run_query
(
hdb
,
0
,
query
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
query
=
"DROP TABLE `One`"
;
r
=
run_query
(
href
,
0
,
query
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
query
=
"CREATE TABLE `One` ( "
"`A` CHAR(72), `B` INT PRIMARY KEY `A` )"
;
r
=
run_query
(
hdb
,
0
,
query
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
query
=
"CREATE TABLE `One` ( "
"`A` CHAR(72), `B` INT PRIMARY KEY `A` )"
;
r
=
run_query
(
href
,
0
,
query
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
query
=
"INSERT INTO `One` ( `A`, `B` ) VALUES ( 'hi', 1 )"
;
r
=
run_query
(
href
,
0
,
query
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
/* primary key is string */
r
=
MsiDatabaseMergeA
(
hdb
,
href
,
"MergeErrors"
);
todo_wine
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
query
=
"SELECT * FROM `One`"
;
r
=
do_query
(
hdb
,
query
,
&
hrec
);
todo_wine
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
size
=
MAX_PATH
;
r
=
MsiRecordGetStringA
(
hrec
,
1
,
buf
,
&
size
);
todo_wine
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
todo_wine
ok
(
!
lstrcmpA
(
buf
,
"hi"
),
"Expected
\"
hi
\"
, got
\"
%s
\"\n
"
,
buf
);
r
=
MsiRecordGetInteger
(
hrec
,
2
);
todo_wine
ok
(
r
==
1
,
"Expected 1, got %d
\n
"
,
r
);
MsiCloseHandle
(
hrec
);
/* nothing in MergeErrors */
query
=
"SELECT * FROM `MergeErrors`"
;
r
=
do_query
(
hdb
,
query
,
&
hrec
);
ok
(
r
==
ERROR_BAD_QUERY_SYNTAX
,
"Expected ERROR_BAD_QUERY_SYNTAX, got %d
\n
"
,
r
);
create_file_data
(
"codepage.idt"
,
"
\r\n\r\n
850
\t
_ForceCodepage
\r\n
"
,
0
);
GetCurrentDirectoryA
(
MAX_PATH
,
buf
);
...
...
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