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
f84c1463
Commit
f84c1463
authored
Sep 19, 2006
by
Benjamin Arai
Committed by
Alexandre Julliard
Sep 20, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Adds test to check if "AND" operator returns the correct result for the "WHERE" clause.
parent
32d002c7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
1 deletion
+38
-1
db.c
dlls/msi/tests/db.c
+38
-1
No files found.
dlls/msi/tests/db.c
View file @
f84c1463
...
@@ -1262,9 +1262,12 @@ static void test_streamtable(void)
...
@@ -1262,9 +1262,12 @@ static void test_streamtable(void)
static
void
test_where
(
void
)
static
void
test_where
(
void
)
{
{
MSIHANDLE
hdb
=
0
,
rec
;
MSIHANDLE
hdb
=
0
,
rec
,
view
;
LPCSTR
query
;
LPCSTR
query
;
UINT
r
;
UINT
r
;
DWORD
size
;
CHAR
buf
[
MAX_PATH
];
UINT
count
;
hdb
=
create_db
();
hdb
=
create_db
();
ok
(
hdb
,
"failed to create db
\n
"
);
ok
(
hdb
,
"failed to create db
\n
"
);
...
@@ -1311,6 +1314,40 @@ static void test_where(void)
...
@@ -1311,6 +1314,40 @@ static void test_where(void)
r
=
MsiRecordGetInteger
(
rec
,
2
);
r
=
MsiRecordGetInteger
(
rec
,
2
);
ok
(
1
==
r
,
"field wrong
\n
"
);
ok
(
1
==
r
,
"field wrong
\n
"
);
query
=
"SELECT `DiskId` FROM `Media` WHERE `LastSequence` >= 1 AND DiskId >= 0"
;
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
);
count
=
MsiRecordGetFieldCount
(
rec
);
ok
(
count
==
1
,
"Expected 1 record fields, got %d
\n
"
,
count
);
size
=
MAX_PATH
;
r
=
MsiRecordGetString
(
rec
,
1
,
buf
,
&
size
);
ok
(
r
==
ERROR_SUCCESS
,
"failed to get record string: %d
\n
"
,
r
);
ok
(
!
lstrcmp
(
buf
,
"2"
),
"For (row %d, column 1) expected '%d', got %s
\n
"
,
0
,
2
,
buf
);
r
=
MsiViewFetch
(
view
,
&
rec
);
ok
(
r
==
ERROR_SUCCESS
,
"failed to fetch view: %d
\n
"
,
r
);
size
=
MAX_PATH
;
r
=
MsiRecordGetString
(
rec
,
1
,
buf
,
&
size
);
ok
(
r
==
ERROR_SUCCESS
,
"failed to get record string: %d
\n
"
,
r
);
ok
(
!
lstrcmp
(
buf
,
"3"
),
"For (row %d, column 1) expected '%d', got %s
\n
"
,
1
,
3
,
buf
);
r
=
MsiViewFetch
(
view
,
&
rec
);
ok
(
r
==
ERROR_NO_MORE_ITEMS
,
"expected no more items: %d
\n
"
,
r
);
MsiViewClose
(
view
);
MsiCloseHandle
(
view
);
MsiCloseHandle
(
rec
);
MsiCloseHandle
(
rec
);
MsiCloseHandle
(
hdb
);
MsiCloseHandle
(
hdb
);
...
...
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