Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Unified Diff: third_party/sqlite/src/test/tclsqlite.test

Issue 901033002: Import SQLite 3.8.7.4. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Chromium changes to support SQLite 3.8.7.4. Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/sqlite/src/test/tclsqlite.test
diff --git a/third_party/sqlite/src/test/tclsqlite.test b/third_party/sqlite/src/test/tclsqlite.test
index 8db04ebfa42f01ca4a06ae34865386221c27c4c1..3d9cd46ac6b949e366e0b352b1f961a654bd555a 100644
--- a/third_party/sqlite/src/test/tclsqlite.test
+++ b/third_party/sqlite/src/test/tclsqlite.test
@@ -25,7 +25,7 @@ source $testdir/tester.tcl
if {[sqlite3 -has-codec]} {
set r "sqlite_orig HANDLE FILENAME ?-key CODEC-KEY?"
} else {
- set r "sqlite_orig HANDLE FILENAME ?-vfs VFSNAME? ?-readonly BOOLEAN? ?-create BOOLEAN? ?-nomutex BOOLEAN? ?-fullmutex BOOLEAN?"
+ set r "sqlite_orig HANDLE FILENAME ?-vfs VFSNAME? ?-readonly BOOLEAN? ?-create BOOLEAN? ?-nomutex BOOLEAN? ?-fullmutex BOOLEAN? ?-uri BOOLEAN?"
}
do_test tcl-1.1 {
set v [catch {sqlite3 bogus} msg]
@@ -143,11 +143,11 @@ do_test tcl-1.21 {
set v [catch {db total_changes xyz} msg]
lappend v $msg
} {1 {wrong # args: should be "db total_changes "}}
-do_test tcl-1.20 {
+do_test tcl-1.22 {
set v [catch {db copy} msg]
lappend v $msg
} {1 {wrong # args: should be "db copy CONFLICT-ALGORITHM TABLE FILENAME ?SEPARATOR? ?NULLINDICATOR?"}}
-do_test tcl-1.21 {
+do_test tcl-1.23 {
set v [catch {sqlite3 db2 test.db -vfs nosuchvfs} msg]
lappend v $msg
} {1 {no such vfs: nosuchvfs}}
@@ -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
#
@@ -617,5 +626,16 @@ ifcapable tclvar {
} {31323334 blob}
}
+db func xCall xCall
+proc xCall {} { return "value" }
+do_execsql_test tcl-14.1 {
+ CREATE TABLE t6(x);
+ INSERT INTO t6 VALUES(1);
+}
+do_test tcl-14.2 {
+ db one {SELECT x FROM t6 WHERE xCall()!='value'}
+} {}
+
+
finish_test

Powered by Google App Engine
This is Rietveld 408576698