aboutsummaryrefslogtreecommitdiff
path: root/test/func6.test
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2017-12-29 15:04:49 +0000
committerdrh <drh@noemail.net>2017-12-29 15:04:49 +0000
commit092457b18ce71b6b0f30ea8a67817310feffaebc (patch)
treee967666936f525c57f84a914d272dcdc22a9c031 /test/func6.test
parentfe6d20e9f4d17ad82fd4c4cc69181ad5f52d9d93 (diff)
downloadsqlite-092457b18ce71b6b0f30ea8a67817310feffaebc.tar.gz
sqlite-092457b18ce71b6b0f30ea8a67817310feffaebc.zip
Change the function name to sqlite_unsupported_offset(X). Only enable the
function if compiled with -DSQLITE_ENABLE_OFFSET_SQL_FUNC. The makefiles add that definition to shell builds. FossilOrigin-Name: 7a7f826e324b1a2c332e2f1d0740fd0babffcaca6275a798572f02ad367b99ab
Diffstat (limited to 'test/func6.test')
-rw-r--r--test/func6.test18
1 files changed, 13 insertions, 5 deletions
diff --git a/test/func6.test b/test/func6.test
index 3630aa33d..ff05ee78c 100644
--- a/test/func6.test
+++ b/test/func6.test
@@ -9,10 +9,14 @@
#
#*************************************************************************
#
-# Test cases for the location() function.
+# Test cases for the sqlite_unsupported_offset() function.
#
set testdir [file dirname $argv0]
source $testdir/tester.tcl
+ifcapable !offset_sql_func {
+ finish_test
+ return
+}
do_execsql_test func6-100 {
CREATE TABLE t1(a,b,c,d);
@@ -20,17 +24,21 @@ do_execsql_test func6-100 {
INSERT INTO t1(a,b,c,d) SELECT printf('abc%03x',x), x, 1000-x, NULL FROM c;
}
do_execsql_test func6-110 {
- SELECT a, typeof(location(a)) FROM t1 ORDER BY rowid LIMIT 2;
+ SELECT a, typeof(sqlite_unsupported_offset(a)) FROM t1
+ ORDER BY rowid LIMIT 2;
} {abc001 integer abc002 integer}
do_execsql_test func6-120 {
- SELECT a, typeof(location(+a)) FROM t1 ORDER BY rowid LIMIT 2;
+ SELECT a, typeof(sqlite_unsupported_offset(+a)) FROM t1
+ ORDER BY rowid LIMIT 2;
} {abc001 null abc002 null}
do_execsql_test func6-130 {
CREATE INDEX t1a ON t1(a);
- SELECT a, typeof(location(a)) FROM t1 ORDER BY a LIMIT 2;
+ SELECT a, typeof(sqlite_unsupported_offset(a)) FROM t1
+ ORDER BY a LIMIT 2;
} {abc001 integer abc002 integer}
do_execsql_test func6-140 {
- SELECT a, typeof(location(a)) FROM t1 NOT INDEXED ORDER BY a LIMIT 2;
+ SELECT a, typeof(sqlite_unsupported_offset(a)) FROM t1 NOT INDEXED
+ ORDER BY a LIMIT 2;
} {abc001 integer abc002 integer}
finish_test