msi: Don't treat carriage returns as spaces.
This commit is contained in:
parent
7f3faffc3b
commit
2f1eacfcad
|
@ -5344,11 +5344,8 @@ static void test_carriagereturn(void)
|
|||
|
||||
query = "CREATE TABLE `Table`\r ( `A` CHAR(72) NOT NULL PRIMARY KEY `A` )";
|
||||
r = run_query(hdb, 0, query);
|
||||
todo_wine
|
||||
{
|
||||
ok(r == ERROR_BAD_QUERY_SYNTAX,
|
||||
"Expected ERROR_BAD_QUERY_SYNTAX, got %d\n", r);
|
||||
}
|
||||
ok(r == ERROR_BAD_QUERY_SYNTAX,
|
||||
"Expected ERROR_BAD_QUERY_SYNTAX, got %d\n", r);
|
||||
|
||||
query = "CREATE TABLE `Table` \r( `A` CHAR(72) NOT NULL PRIMARY KEY `A` )";
|
||||
r = run_query(hdb, 0, query);
|
||||
|
@ -5449,11 +5446,8 @@ static void test_carriagereturn(void)
|
|||
|
||||
query = "CREATE TABLE `Four` ( `A` CHAR(72\r) NOT NULL PRIMARY KEY `A` )";
|
||||
r = run_query(hdb, 0, query);
|
||||
todo_wine
|
||||
{
|
||||
ok(r == ERROR_BAD_QUERY_SYNTAX,
|
||||
"Expected ERROR_BAD_QUERY_SYNTAX, got %d\n", r);
|
||||
}
|
||||
ok(r == ERROR_BAD_QUERY_SYNTAX,
|
||||
"Expected ERROR_BAD_QUERY_SYNTAX, got %d\n", r);
|
||||
|
||||
query = "CREATE TABLE `Four` ( `A` CHAR(\r72) NOT NULL PRIMARY KEY `A` )";
|
||||
r = run_query(hdb, 0, query);
|
||||
|
@ -5487,10 +5481,7 @@ static void test_carriagereturn(void)
|
|||
size = MAX_PATH;
|
||||
r = MsiRecordGetStringA(hrec, 1, buf, &size);
|
||||
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
|
||||
todo_wine
|
||||
{
|
||||
ok(!lstrcmpA(buf, "\rOne"), "Expected \"\\rOne\", got \"%s\"\n", buf);
|
||||
}
|
||||
ok(!lstrcmpA(buf, "\rOne"), "Expected \"\\rOne\", got \"%s\"\n", buf);
|
||||
|
||||
MsiCloseHandle(hrec);
|
||||
|
||||
|
@ -5500,10 +5491,7 @@ static void test_carriagereturn(void)
|
|||
size = MAX_PATH;
|
||||
r = MsiRecordGetStringA(hrec, 1, buf, &size);
|
||||
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
|
||||
todo_wine
|
||||
{
|
||||
ok(!lstrcmpA(buf, "Tw\ro"), "Expected \"Tw\\ro\", got \"%s\"\n", buf);
|
||||
}
|
||||
ok(!lstrcmpA(buf, "Tw\ro"), "Expected \"Tw\\ro\", got \"%s\"\n", buf);
|
||||
|
||||
MsiCloseHandle(hrec);
|
||||
|
||||
|
@ -5513,20 +5501,12 @@ static void test_carriagereturn(void)
|
|||
size = MAX_PATH;
|
||||
r = MsiRecordGetStringA(hrec, 1, buf, &size);
|
||||
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
|
||||
todo_wine
|
||||
{
|
||||
ok(!lstrcmpA(buf, "Three\r"),
|
||||
"Expected \"Three\r\", got \"%s\"\n", buf);
|
||||
}
|
||||
ok(!lstrcmpA(buf, "Three\r"), "Expected \"Three\r\", got \"%s\"\n", buf);
|
||||
|
||||
MsiCloseHandle(hrec);
|
||||
|
||||
r = MsiViewFetch(hview, &hrec);
|
||||
todo_wine
|
||||
{
|
||||
ok(r == ERROR_NO_MORE_ITEMS,
|
||||
"Expected ERROR_NO_MORE_ITEMS, got %d\n", r);
|
||||
}
|
||||
ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r);
|
||||
|
||||
MsiViewClose(hview);
|
||||
MsiCloseHandle(hview);
|
||||
|
|
|
@ -193,8 +193,8 @@ static const char isIdChar[] = {
|
|||
int sqliteGetToken(const WCHAR *z, int *tokenType){
|
||||
int i;
|
||||
switch( *z ){
|
||||
case ' ': case '\t': case '\n': case '\f': case '\r': {
|
||||
for(i=1; isspace(z[i]); i++){}
|
||||
case ' ': case '\t': case '\n': case '\f': {
|
||||
for(i=1; isspace(z[i]) && z[i] != '\r'; i++){}
|
||||
*tokenType = TK_SPACE;
|
||||
return i;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue