mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-30 19:03:16 +03:00
The new function code passes regression tests. (CVS 403)
FossilOrigin-Name: b00cf110b1cc671b7200a5ce8b9e704f660763c9
This commit is contained in:
@ -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.19 2002/02/23 23:45:47 drh Exp $
|
||||
# $Id: select1.test,v 1.20 2002/02/28 03:04:48 drh Exp $
|
||||
|
||||
set testdir [file dirname $argv0]
|
||||
source $testdir/tester.tcl
|
||||
@ -107,7 +107,7 @@ execsql {INSERT INTO test1 VALUES(33,44)}
|
||||
do_test select1-2.1 {
|
||||
set v [catch {execsql {SELECT count(f1,f2) FROM test1}} msg]
|
||||
lappend v $msg
|
||||
} {1 {too many arguments to function count()}}
|
||||
} {1 {wrong number of arguments to function count()}}
|
||||
do_test select1-2.2 {
|
||||
set v [catch {execsql {SELECT count(f1) FROM test1}} msg]
|
||||
lappend v $msg
|
||||
@ -127,7 +127,7 @@ do_test select1-2.5 {
|
||||
do_test select1-2.6 {
|
||||
set v [catch {execsql {SELECT min(*) FROM test1}} msg]
|
||||
lappend v $msg
|
||||
} {1 {too few arguments to function min()}}
|
||||
} {0 {{} {}}}
|
||||
do_test select1-2.7 {
|
||||
set v [catch {execsql {SELECT Min(f1) FROM test1}} msg]
|
||||
lappend v $msg
|
||||
@ -139,7 +139,7 @@ do_test select1-2.8 {
|
||||
do_test select1-2.9 {
|
||||
set v [catch {execsql {SELECT MAX(*) FROM test1}} msg]
|
||||
lappend v $msg
|
||||
} {1 {too few arguments to function MAX()}}
|
||||
} {0 {{} {}}}
|
||||
do_test select1-2.10 {
|
||||
set v [catch {execsql {SELECT Max(f1) FROM test1}} msg]
|
||||
lappend v $msg
|
||||
@ -159,7 +159,7 @@ do_test select1-2.13 {
|
||||
do_test select1-2.14 {
|
||||
set v [catch {execsql {SELECT SUM(*) FROM test1}} msg]
|
||||
lappend v $msg
|
||||
} {1 {too few arguments to function SUM()}}
|
||||
} {1 {wrong number of arguments to function SUM()}}
|
||||
do_test select1-2.15 {
|
||||
set v [catch {execsql {SELECT Sum(f1) FROM test1}} msg]
|
||||
lappend v $msg
|
||||
@ -167,7 +167,7 @@ do_test select1-2.15 {
|
||||
do_test select1-2.16 {
|
||||
set v [catch {execsql {SELECT sum(f1,f2) FROM test1}} msg]
|
||||
lappend v $msg
|
||||
} {1 {too many arguments to function sum()}}
|
||||
} {1 {wrong number of arguments to function sum()}}
|
||||
do_test select1-2.17 {
|
||||
set v [catch {execsql {SELECT SUM(f1)+1 FROM test1}} msg]
|
||||
lappend v $msg
|
||||
@ -222,7 +222,7 @@ do_test select1-3.8 {
|
||||
do_test select1-3.9 {
|
||||
set v [catch {execsql {SELECT f1 FROM test1 WHERE count(f1,f2)!=11}} msg]
|
||||
lappend v $msg
|
||||
} {1 {misuse of aggregate function count()}}
|
||||
} {1 {wrong number of arguments to function count()}}
|
||||
|
||||
# ORDER BY expressions
|
||||
#
|
||||
@ -432,7 +432,7 @@ do_test select1-8.4 {
|
||||
SELECT f1/(f1-11), min(f1/(f1-11),5), max(f1/(f1-33),6)
|
||||
FROM test1 ORDER BY f1
|
||||
}
|
||||
} {{} 5 6 1.5 1.5 6}
|
||||
} {{} {} 6 1.5 1.5 6}
|
||||
do_test select1-8.5 {
|
||||
execsql {
|
||||
SELECT min(1,2,3), -max(1,2,3)
|
||||
|
Reference in New Issue
Block a user