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
07c321ba
Commit
07c321ba
authored
Oct 18, 2009
by
Nate Gallaher
Committed by
Alexandre Julliard
Oct 27, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Test that a query on a join of two tables returns data from the correct table.
parent
cc366e12
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
96 additions
and
0 deletions
+96
-0
db.c
dlls/msi/tests/db.c
+96
-0
No files found.
dlls/msi/tests/db.c
View file @
07c321ba
...
...
@@ -1566,6 +1566,101 @@ static void test_binary(void)
DeleteFile
(
msifile
);
}
static
void
test_where_not_in_selected
(
void
)
{
MSIHANDLE
hdb
=
0
,
rec
,
view
;
LPCSTR
query
;
UINT
r
;
hdb
=
create_db
();
ok
(
hdb
,
"failed to create db
\n
"
);
r
=
run_query
(
hdb
,
0
,
"CREATE TABLE `IESTable` ("
"`Action` CHAR(64), "
"`Condition` CHAR(64), "
"`Sequence` LONG PRIMARY KEY `Sequence`)"
);
ok
(
r
==
S_OK
,
"Cannot create IESTable table: %d
\n
"
,
r
);
r
=
run_query
(
hdb
,
0
,
"CREATE TABLE `CATable` ("
"`Action` CHAR(64), "
"`Type` LONG PRIMARY KEY `Type`)"
);
ok
(
r
==
S_OK
,
"Cannot create CATable table: %d
\n
"
,
r
);
r
=
run_query
(
hdb
,
0
,
"INSERT INTO `IESTable` "
"( `Action`, `Condition`, `Sequence`) "
"VALUES ( 'clean', 'cond4', 4)"
);
ok
(
r
==
S_OK
,
"cannot add entry to IESTable table:%d
\n
"
,
r
);
r
=
run_query
(
hdb
,
0
,
"INSERT INTO `IESTable` "
"( `Action`, `Condition`, `Sequence`) "
"VALUES ( 'depends', 'cond1', 1)"
);
ok
(
r
==
S_OK
,
"cannot add entry to IESTable table:%d
\n
"
,
r
);
r
=
run_query
(
hdb
,
0
,
"INSERT INTO `IESTable` "
"( `Action`, `Condition`, `Sequence`) "
"VALUES ( 'build', 'cond2', 2)"
);
ok
(
r
==
S_OK
,
"cannot add entry to IESTable table:%d
\n
"
,
r
);
r
=
run_query
(
hdb
,
0
,
"INSERT INTO `IESTable` "
"( `Action`, `Condition`, `Sequence`) "
"VALUES ( 'build2', 'cond6', 6)"
);
ok
(
r
==
S_OK
,
"cannot add entry to IESTable table:%d
\n
"
,
r
);
r
=
run_query
(
hdb
,
0
,
"INSERT INTO `IESTable` "
"( `Action`, `Condition`, `Sequence`) "
"VALUES ( 'build', 'cond3', 3)"
);
ok
(
r
==
S_OK
,
"cannot add entry to IESTable table:%d
\n
"
,
r
);
r
=
run_query
(
hdb
,
0
,
"INSERT INTO `CATable` "
"( `Action`, `Type` ) "
"VALUES ( 'build', 32)"
);
ok
(
r
==
S_OK
,
"cannot add entry to CATable table:%d
\n
"
,
r
);
r
=
run_query
(
hdb
,
0
,
"INSERT INTO `CATable` "
"( `Action`, `Type` ) "
"VALUES ( 'depends', 64)"
);
ok
(
r
==
S_OK
,
"cannot add entry to CATable table:%d
\n
"
,
r
);
r
=
run_query
(
hdb
,
0
,
"INSERT INTO `CATable` "
"( `Action`, `Type` ) "
"VALUES ( 'clean', 63)"
);
ok
(
r
==
S_OK
,
"cannot add entry to CATable table:%d
\n
"
,
r
);
r
=
run_query
(
hdb
,
0
,
"INSERT INTO `CATable` "
"( `Action`, `Type` ) "
"VALUES ( 'build2', 34)"
);
ok
(
r
==
S_OK
,
"cannot add entry to CATable table:%d
\n
"
,
r
);
query
=
"Select IESTable.Condition from CATable, IESTable where "
"CATable.Action = IESTable.Action and CATable.Type = 32"
;
r
=
MsiDatabaseOpenView
(
hdb
,
query
,
&
view
);
ok
(
r
==
ERROR_SUCCESS
,
"failed to open view: %d
\n
"
,
r
);
r
=
MsiViewExecute
(
view
,
0
);
ok
(
r
==
ERROR_SUCCESS
,
"failed to execute view: %d
\n
"
,
r
);
r
=
MsiViewFetch
(
view
,
&
rec
);
ok
(
r
==
ERROR_SUCCESS
,
"failed to fetch view: %d
\n
"
,
r
);
ok
(
check_record
(
rec
,
1
,
"cond2"
),
"wrong condition
\n
"
);
MsiCloseHandle
(
rec
);
r
=
MsiViewFetch
(
view
,
&
rec
);
ok
(
r
==
ERROR_SUCCESS
,
"failed to fetch view: %d
\n
"
,
r
);
ok
(
check_record
(
rec
,
1
,
"cond3"
),
"wrong condition
\n
"
);
MsiCloseHandle
(
rec
);
MsiViewClose
(
view
);
MsiCloseHandle
(
view
);
MsiCloseHandle
(
hdb
);
DeleteFile
(
msifile
);
}
static
void
test_where
(
void
)
{
MSIHANDLE
hdb
=
0
,
rec
,
view
;
...
...
@@ -8450,6 +8545,7 @@ START_TEST(db)
test_longstrings
();
test_streamtable
();
test_binary
();
test_where_not_in_selected
();
test_where
();
test_msiimport
();
test_binary_import
();
...
...
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