1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-30 19:03:16 +03:00

Fix the sqlite_complete() routine so that it recognizes /*...*/ comments.

Ticket #277. (CVS 937)

FossilOrigin-Name: ef8eb580fc6c40264219c2ae77a9c4f8a5803c8b
This commit is contained in:
drh
2003-04-26 02:31:54 +00:00
parent 85e2096fb6
commit 524a5bf5f6
4 changed files with 65 additions and 13 deletions

View File

@ -11,7 +11,7 @@
# This file implements regression tests for SQLite library. The
# focus of this file is exercising the code in main.c.
#
# $Id: main.test,v 1.12 2003/04/16 02:17:36 drh Exp $
# $Id: main.test,v 1.13 2003/04/26 02:31:54 drh Exp $
set testdir [file dirname $argv0]
source $testdir/tester.tcl
@ -24,12 +24,12 @@ do_test main-1.1 {
do_test main-1.2 {
db complete {
}
} {0}
} {1}
do_test main-1.3 {
db complete {
-- a comment ;
}
} {0}
} {1}
do_test main-1.4 {
db complete {
-- a comment ;
@ -158,6 +158,45 @@ do_test main-1.29 {
EXPLAIN select * from xyz;
}
} {0}
do_test main-1.30 {
db complete {
CREATE TABLE /* In comment ; */
}
} {0}
do_test main-1.31 {
db complete {
CREATE TABLE /* In comment ; */ hi;
}
} {1}
do_test main-1.32 {
db complete {
stuff;
/*
CREATE TABLE
multiple lines
of text
*/
}
} {1}
do_test main-1.33 {
db complete {
/*
CREATE TABLE
multiple lines
of text;
}
} {0}
do_test main-1.34 {
db complete {
/*
CREATE TABLE
multiple lines "*/
of text;
}
} {1}
do_test main-1.35 {
db complete {hi /**/ there;}
} {1}
# Try to open a database with a corrupt database file.