diff options
author | drh <drh@noemail.net> | 2012-10-03 11:02:33 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2012-10-03 11:02:33 +0000 |
commit | c45e67162de9ad08991b095db0f5ae6d089f3535 (patch) | |
tree | 35f41820f42d3cb6a8786a1e07cfc52d44b3242c /test/tclsqlite.test | |
parent | e7c54168faa48c0e589b5fbbe9fd96409801b177 (diff) | |
download | sqlite-c45e67162de9ad08991b095db0f5ae6d089f3535.tar.gz sqlite-c45e67162de9ad08991b095db0f5ae6d089f3535.zip |
Fix the TCL interface so that SQL functions implemented in TCL honor the
"nullvalue" setting. Also remove from the TCL interface some unused
legacy UTF8 translation code left over from SQLite2.
FossilOrigin-Name: c1f10a2643179ec58f3879764e9e89676d4b5f91
Diffstat (limited to 'test/tclsqlite.test')
-rw-r--r-- | test/tclsqlite.test | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/test/tclsqlite.test b/test/tclsqlite.test index 5761e1604..3d9cd46ac 100644 --- a/test/tclsqlite.test +++ b/test/tclsqlite.test @@ -319,14 +319,23 @@ do_test tcl-8.1 { execsql {INSERT INTO t1 VALUES(30,NULL)} db eval {SELECT * FROM t1 WHERE b IS NULL} } {30 NaN} +proc concatFunc args {return [join $args {}]} do_test tcl-8.2 { + db function concat concatFunc + db eval {SELECT concat('a', b, 'z') FROM t1 WHERE b is NULL} +} {aNaNz} +do_test tcl-8.3 { db nullvalue NULL db nullvalue } {NULL} -do_test tcl-8.3 { +do_test tcl-8.4 { db nullvalue {} db eval {SELECT * FROM t1 WHERE b IS NULL} } {30 {}} +do_test tcl-8.5 { + db function concat concatFunc + db eval {SELECT concat('a', b, 'z') FROM t1 WHERE b is NULL} +} {az} # Test the return type of user-defined functions # |