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
ef1af6ad
Commit
ef1af6ad
authored
Dec 04, 2006
by
Mike McCormack
Committed by
Alexandre Julliard
Dec 04, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Add tests for quoting in queries.
parent
a60d4b2d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
0 deletions
+33
-0
db.c
dlls/msi/tests/db.c
+33
-0
No files found.
dlls/msi/tests/db.c
View file @
ef1af6ad
...
@@ -656,6 +656,39 @@ static void test_msibadqueries(void)
...
@@ -656,6 +656,39 @@ static void test_msibadqueries(void)
r
=
try_query
(
hdb
,
"CREATE TABLE `c` (`b` CHAR NOT NULL PRIMARY KEY `b`)"
);
r
=
try_query
(
hdb
,
"CREATE TABLE `c` (`b` CHAR NOT NULL PRIMARY KEY `b`)"
);
ok
(
r
==
ERROR_SUCCESS
,
"query 8 failed
\n
"
);
ok
(
r
==
ERROR_SUCCESS
,
"query 8 failed
\n
"
);
r
=
try_query
(
hdb
,
"select * from c"
);
ok
(
r
==
ERROR_SUCCESS
,
"query failed
\n
"
);
r
=
try_query
(
hdb
,
"select * from c where b = 'x"
);
todo_wine
ok
(
r
==
ERROR_BAD_QUERY_SYNTAX
,
"query failed
\n
"
);
r
=
try_query
(
hdb
,
"select * from 'c'"
);
ok
(
r
==
ERROR_BAD_QUERY_SYNTAX
,
"query failed
\n
"
);
r
=
try_query
(
hdb
,
"select * from ''"
);
ok
(
r
==
ERROR_BAD_QUERY_SYNTAX
,
"query failed
\n
"
);
r
=
try_query
(
hdb
,
"select * from c where b = x"
);
ok
(
r
==
ERROR_BAD_QUERY_SYNTAX
,
"query failed
\n
"
);
r
=
try_query
(
hdb
,
"select * from c where b =
\"
x
\"
"
);
todo_wine
ok
(
r
==
ERROR_BAD_QUERY_SYNTAX
,
"query failed
\n
"
);
r
=
try_query
(
hdb
,
"select * from c where b = 'x'"
);
ok
(
r
==
ERROR_SUCCESS
,
"query failed
\n
"
);
r
=
try_query
(
hdb
,
"select * from c where b = '
\"
x'"
);
ok
(
r
==
ERROR_SUCCESS
,
"query failed
\n
"
);
if
(
0
)
/* FIXME: this query causes trouble with other tests */
{
r
=
try_query
(
hdb
,
"select * from c where b = '
\\\'
x'"
);
ok
(
r
==
ERROR_BAD_QUERY_SYNTAX
,
"query failed
\n
"
);
}
r
=
try_query
(
hdb
,
"select * from 'c'"
);
ok
(
r
==
ERROR_BAD_QUERY_SYNTAX
,
"query failed
\n
"
);
r
=
MsiCloseHandle
(
hdb
);
r
=
MsiCloseHandle
(
hdb
);
ok
(
r
==
ERROR_SUCCESS
,
"Failed to close database transact
\n
"
);
ok
(
r
==
ERROR_SUCCESS
,
"Failed to close database transact
\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