Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
bfc1b5c1
Commit
bfc1b5c1
authored
Sep 12, 2006
by
James Hawkins
Committed by
Alexandre Julliard
Sep 13, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Add more join tests.
parent
75ee2262
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
162 additions
and
0 deletions
+162
-0
db.c
dlls/msi/tests/db.c
+162
-0
No files found.
dlls/msi/tests/db.c
View file @
bfc1b5c1
...
...
@@ -1760,6 +1760,28 @@ static const struct join_res join_res_fourth[] =
{
"msvcp.dll.01234"
,
"single.dll.31415"
},
};
static
const
struct
join_res
join_res_fifth
[]
=
{
{
"malar"
,
"procerus"
},
};
static
const
struct
join_res
join_res_sixth
[]
=
{
{
"malar"
,
"procerus"
},
{
"malar"
,
"procerus"
},
{
"malar"
,
"nasalis"
},
{
"malar"
,
"nasalis"
},
{
"malar"
,
"nasalis"
},
{
"malar"
,
"mentalis"
},
};
static
const
struct
join_res
join_res_seventh
[]
=
{
{
"malar"
,
"nasalis"
},
{
"malar"
,
"nasalis"
},
{
"malar"
,
"nasalis"
},
};
static
void
test_join
(
void
)
{
MSIHANDLE
hdb
,
hview
,
hrec
;
...
...
@@ -1989,6 +2011,146 @@ static void test_join(void)
MsiViewClose
(
hview
);
MsiCloseHandle
(
hview
);
query
=
"SELECT `Component`.`ComponentId`, `FeatureComponents`.`Feature_` "
"FROM `Component`, `FeatureComponents` "
"WHERE `Component`.`Component` = 'zygomatic' "
"AND `FeatureComponents`.`Component_` = 'maxilla' "
"ORDER BY `Feature_`"
;
r
=
MsiDatabaseOpenView
(
hdb
,
query
,
&
hview
);
todo_wine
{
ok
(
r
==
ERROR_SUCCESS
,
"failed to open view: %d
\n
"
,
r
);
}
r
=
MsiViewExecute
(
hview
,
0
);
todo_wine
{
ok
(
r
==
ERROR_SUCCESS
,
"failed to execute view: %d
\n
"
,
r
);
}
i
=
0
;
while
((
r
=
MsiViewFetch
(
hview
,
&
hrec
))
==
ERROR_SUCCESS
)
{
count
=
MsiRecordGetFieldCount
(
hrec
);
ok
(
count
==
2
,
"Expected 2 record fields, got %d
\n
"
,
count
);
size
=
MAX_PATH
;
r
=
MsiRecordGetString
(
hrec
,
1
,
buf
,
&
size
);
ok
(
r
==
ERROR_SUCCESS
,
"failed to get record string: %d
\n
"
,
r
);
ok
(
!
lstrcmp
(
buf
,
join_res_fifth
[
i
].
one
),
"Expected '%s', got %s
\n
"
,
join_res_fifth
[
i
].
one
,
buf
);
size
=
MAX_PATH
;
r
=
MsiRecordGetString
(
hrec
,
2
,
buf
,
&
size
);
ok
(
r
==
ERROR_SUCCESS
,
"failed to get record string: %d
\n
"
,
r
);
ok
(
!
lstrcmp
(
buf
,
join_res_fifth
[
i
].
two
),
"Expected '%s', got %s
\n
"
,
join_res_fifth
[
i
].
two
,
buf
);
i
++
;
MsiCloseHandle
(
hrec
);
}
todo_wine
{
ok
(
r
==
ERROR_NO_MORE_ITEMS
,
"expected no more items: %d
\n
"
,
r
);
}
MsiViewClose
(
hview
);
MsiCloseHandle
(
hview
);
query
=
"SELECT `Component`.`ComponentId`, `FeatureComponents`.`Feature_` "
"FROM `Component`, `FeatureComponents` "
"WHERE `Component` = 'zygomatic' "
"ORDER BY `Feature_`"
;
r
=
MsiDatabaseOpenView
(
hdb
,
query
,
&
hview
);
todo_wine
{
ok
(
r
==
ERROR_SUCCESS
,
"failed to open view: %d
\n
"
,
r
);
}
r
=
MsiViewExecute
(
hview
,
0
);
todo_wine
{
ok
(
r
==
ERROR_SUCCESS
,
"failed to execute view: %d
\n
"
,
r
);
}
i
=
0
;
while
((
r
=
MsiViewFetch
(
hview
,
&
hrec
))
==
ERROR_SUCCESS
)
{
count
=
MsiRecordGetFieldCount
(
hrec
);
ok
(
count
==
2
,
"Expected 2 record fields, got %d
\n
"
,
count
);
size
=
MAX_PATH
;
r
=
MsiRecordGetString
(
hrec
,
1
,
buf
,
&
size
);
ok
(
r
==
ERROR_SUCCESS
,
"failed to get record string: %d
\n
"
,
r
);
ok
(
!
lstrcmp
(
buf
,
join_res_sixth
[
i
].
one
),
"Expected '%s', got %s
\n
"
,
join_res_sixth
[
i
].
one
,
buf
);
size
=
MAX_PATH
;
r
=
MsiRecordGetString
(
hrec
,
2
,
buf
,
&
size
);
ok
(
r
==
ERROR_SUCCESS
,
"failed to get record string: %d
\n
"
,
r
);
ok
(
!
lstrcmp
(
buf
,
join_res_sixth
[
i
].
two
),
"Expected '%s', got %s
\n
"
,
join_res_sixth
[
i
].
two
,
buf
);
i
++
;
MsiCloseHandle
(
hrec
);
}
todo_wine
{
ok
(
r
==
ERROR_NO_MORE_ITEMS
,
"expected no more items: %d
\n
"
,
r
);
}
MsiViewClose
(
hview
);
MsiCloseHandle
(
hview
);
query
=
"SELECT `Component`.`ComponentId`, `FeatureComponents`.`Feature_` "
"FROM `Component`, `FeatureComponents` "
"WHERE `Component` = 'zygomatic' "
"AND `Feature_` = 'nasalis' "
"ORDER BY `Feature_`"
;
r
=
MsiDatabaseOpenView
(
hdb
,
query
,
&
hview
);
todo_wine
{
ok
(
r
==
ERROR_SUCCESS
,
"failed to open view: %d
\n
"
,
r
);
}
r
=
MsiViewExecute
(
hview
,
0
);
todo_wine
{
ok
(
r
==
ERROR_SUCCESS
,
"failed to execute view: %d
\n
"
,
r
);
}
i
=
0
;
while
((
r
=
MsiViewFetch
(
hview
,
&
hrec
))
==
ERROR_SUCCESS
)
{
count
=
MsiRecordGetFieldCount
(
hrec
);
ok
(
count
==
2
,
"Expected 2 record fields, got %d
\n
"
,
count
);
size
=
MAX_PATH
;
r
=
MsiRecordGetString
(
hrec
,
1
,
buf
,
&
size
);
ok
(
r
==
ERROR_SUCCESS
,
"failed to get record string: %d
\n
"
,
r
);
ok
(
!
lstrcmp
(
buf
,
join_res_seventh
[
i
].
one
),
"Expected '%s', got %s
\n
"
,
join_res_seventh
[
i
].
one
,
buf
);
size
=
MAX_PATH
;
r
=
MsiRecordGetString
(
hrec
,
2
,
buf
,
&
size
);
ok
(
r
==
ERROR_SUCCESS
,
"failed to get record string: %d
\n
"
,
r
);
ok
(
!
lstrcmp
(
buf
,
join_res_seventh
[
i
].
two
),
"Expected '%s', got %s
\n
"
,
join_res_seventh
[
i
].
two
,
buf
);
i
++
;
MsiCloseHandle
(
hrec
);
}
todo_wine
{
ok
(
r
==
ERROR_NO_MORE_ITEMS
,
"expected no more items: %d
\n
"
,
r
);
}
MsiViewClose
(
hview
);
MsiCloseHandle
(
hview
);
MsiCloseHandle
(
hdb
);
DeleteFile
(
msifile
);
}
...
...
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