mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-30 19:03:16 +03:00
(1) Modifications to the user-function interface and (2) Internal changes
to automatically created indices. (CVS 1575) FossilOrigin-Name: 5903f53828b5d282b33e27813417e4317c9ecf0b
This commit is contained in:
@ -11,7 +11,7 @@
|
||||
# This file implements regression tests for SQLite library. The
|
||||
# focus of this file is testing built-in functions.
|
||||
#
|
||||
# $Id: func.test,v 1.20 2004/06/02 00:41:10 drh Exp $
|
||||
# $Id: func.test,v 1.21 2004/06/12 09:25:30 danielk1977 Exp $
|
||||
|
||||
set testdir [file dirname $argv0]
|
||||
source $testdir/tester.tcl
|
||||
@ -336,4 +336,44 @@ do_test func-11.1 {
|
||||
}
|
||||
} [sqlite -version]
|
||||
|
||||
# Test that destructors passed to sqlite by calls to sqlite3_result_text()
|
||||
# etc. are called.
|
||||
do_test func-12.1 {
|
||||
execsql {
|
||||
SELECT test_destructor('hello world'), test_destructor_count();
|
||||
}
|
||||
} {{hello world} 1}
|
||||
do_test func-12.2 {
|
||||
execsql {
|
||||
SELECT test_destructor_count();
|
||||
}
|
||||
} {0}
|
||||
do_test func-12.3 {
|
||||
execsql {
|
||||
SELECT test_destructor('hello')||' world', test_destructor_count();
|
||||
}
|
||||
} {{hello world} 0}
|
||||
do_test func-12.4 {
|
||||
execsql {
|
||||
SELECT test_destructor_count();
|
||||
}
|
||||
} {0}
|
||||
do_test func-12.5 {
|
||||
execsql {
|
||||
CREATE TABLE t4(x);
|
||||
INSERT INTO t4 VALUES(test_destructor('hello'));
|
||||
INSERT INTO t4 VALUES(test_destructor('world'));
|
||||
SELECT min(test_destructor(x)), max(test_destructor(x)) FROM t4;
|
||||
}
|
||||
} {hello world}
|
||||
do_test func-12.6 {
|
||||
execsql {
|
||||
SELECT test_destructor_count();
|
||||
}
|
||||
} {0}
|
||||
|
||||
|
||||
finish_test
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user