Additional test coverage in select.c and expr.c. (CVS 5381)
FossilOrigin-Name: c6cf08477cc4d622a05ad6706cb9418cf7eea432
This commit is contained in:
+11
-2
@@ -11,7 +11,7 @@
|
||||
# This file implements regression tests for SQLite library. The
|
||||
# focus of this script testing the sqlite_bind API.
|
||||
#
|
||||
# $Id: bind.test,v 1.43 2008/07/08 00:06:51 drh Exp $
|
||||
# $Id: bind.test,v 1.44 2008/07/09 01:39:44 drh Exp $
|
||||
#
|
||||
|
||||
set testdir [file dirname $argv0]
|
||||
@@ -438,7 +438,7 @@ do_test bind-9.2 {
|
||||
} msg]
|
||||
lappend rc $msg
|
||||
} {1 {(1) variable number must be between ?1 and ?999}}
|
||||
do_test bind-9.3 {
|
||||
do_test bind-9.3.1 {
|
||||
set VM [
|
||||
sqlite3_prepare $DB {
|
||||
INSERT INTO t2(a,b) VALUES(?1,?999)
|
||||
@@ -447,6 +447,15 @@ do_test bind-9.3 {
|
||||
sqlite3_bind_parameter_count $VM
|
||||
} {999}
|
||||
catch {sqlite3_finalize $VM}
|
||||
do_test bind-9.3.2 {
|
||||
set VM [
|
||||
sqlite3_prepare $DB {
|
||||
INSERT INTO t2(a,b) VALUES(?2,?998)
|
||||
} -1 TAIL
|
||||
]
|
||||
sqlite3_bind_parameter_count $VM
|
||||
} {998}
|
||||
catch {sqlite3_finalize $VM}
|
||||
do_test bind-9.4 {
|
||||
set VM [
|
||||
sqlite3_prepare $DB {
|
||||
|
||||
+33
-1
@@ -11,7 +11,7 @@
|
||||
# This file implements regression tests for SQLite library. The
|
||||
# focus of this file is testing the SELECT statement.
|
||||
#
|
||||
# $Id: select1.test,v 1.61 2008/06/24 12:46:31 drh Exp $
|
||||
# $Id: select1.test,v 1.62 2008/07/09 01:39:44 drh Exp $
|
||||
|
||||
set testdir [file dirname $argv0]
|
||||
source $testdir/tester.tcl
|
||||
@@ -506,6 +506,38 @@ do_test select1-6.9.2 {
|
||||
lappend v $msg
|
||||
} {0 {f1 11 f1 11 f1 33 f1 33 f1 11 f1 11 f1 33 f1 33}}
|
||||
|
||||
do_test select1-6.9.3 {
|
||||
db eval {
|
||||
PRAGMA short_column_names=OFF;
|
||||
PRAGMA full_column_names=OFF;
|
||||
}
|
||||
execsql2 {
|
||||
SELECT test1 . f1, test1 . f2 FROM test1 LIMIT 1
|
||||
}
|
||||
} {{test1 . f1} 11 {test1 . f2} 22}
|
||||
do_test select1-6.9.4 {
|
||||
db eval {
|
||||
PRAGMA short_column_names=OFF;
|
||||
PRAGMA full_column_names=ON;
|
||||
}
|
||||
execsql2 {
|
||||
SELECT test1 . f1, test1 . f2 FROM test1 LIMIT 1
|
||||
}
|
||||
} {test1.f1 11 test1.f2 22}
|
||||
do_test select1-6.9.5 {
|
||||
db eval {
|
||||
PRAGMA short_column_names=OFF;
|
||||
PRAGMA full_column_names=ON;
|
||||
}
|
||||
execsql2 {
|
||||
SELECT 123.45;
|
||||
}
|
||||
} {123.45 123.45}
|
||||
db eval {
|
||||
PRAGMA short_column_names=ON;
|
||||
PRAGMA full_column_names=OFF;
|
||||
}
|
||||
|
||||
ifcapable compound {
|
||||
do_test select1-6.10 {
|
||||
set v [catch {execsql2 {
|
||||
|
||||
Reference in New Issue
Block a user