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

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

Issue 6990047: Import SQLite 3.7.6.3. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 7 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
« no previous file with comments | « third_party/sqlite/src/test/hook.test ('k') | third_party/sqlite/src/test/in.test » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/sqlite/src/test/icu.test
diff --git a/third_party/sqlite/src/test/icu.test b/third_party/sqlite/src/test/icu.test
index 1138b3d252b34d5d61a2e7ca49cff4fcabf72492..73cb9b913e95b594440e861c353722ea6f05b954 100644
--- a/third_party/sqlite/src/test/icu.test
+++ b/third_party/sqlite/src/test/icu.test
@@ -26,12 +26,12 @@ execsql {CREATE TABLE test1(i1 int, i2 int, r1 real, r2 real, t1 text, t2 text)}
execsql {INSERT INTO test1 VALUES(1,2,1.1,2.2,'hello','world')}
proc test_expr {name settings expr result} {
do_test $name [format {
- db one {
+ lindex [db eval {
BEGIN;
UPDATE test1 SET %s;
SELECT %s FROM test1;
ROLLBACK;
- }
+ }] 0
} $settings $expr] $result
}
@@ -114,4 +114,23 @@ do_test icu-4.3 {
}
} {apricot cherry chokecherry yamot peach plum}
+#-------------------------------------------------------------------------
+# Test that it is not possible to call the ICU regex() function with
+# anything other than exactly two arguments. See also:
+#
+# http://src.chromium.org/viewvc/chrome/trunk/src/third_party/sqlite/icu-regexp.patch?revision=34807&view=markup
+#
+do_catchsql_test icu-5.1 { SELECT regexp('a[abc]c.*', 'abc') } {0 1}
+do_catchsql_test icu-5.2 {
+ SELECT regexp('a[abc]c.*')
+} {1 {wrong number of arguments to function regexp()}}
+do_catchsql_test icu-5.3 {
+ SELECT regexp('a[abc]c.*', 'abc', 'c')
+} {1 {wrong number of arguments to function regexp()}}
+do_catchsql_test icu-5.4 {
+ SELECT 'abc' REGEXP 'a[abc]c.*'
+} {0 1}
+do_catchsql_test icu-5.4 { SELECT 'abc' REGEXP } {1 {near " ": syntax error}}
+do_catchsql_test icu-5.5 { SELECT 'abc' REGEXP, 1 } {1 {near ",": syntax error}}
+
finish_test
« no previous file with comments | « third_party/sqlite/src/test/hook.test ('k') | third_party/sqlite/src/test/in.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698