summaryrefslogtreecommitdiff
blob: 3f3779d644e6257868e3bd2826a037f113fa26a3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
https://sqlite.org/src/info/408144a1832569ce

--- /test/vtab1.test
+++ /test/vtab1.test
@@ -1303,25 +1303,27 @@
   CREATE VIRTUAL TABLE e6 USING echo(t6);
 }
 
-foreach {tn sql res filter} {
-  1.1 "SELECT a FROM e6 WHERE b>'8James'" {4 2 6 1 5}
-    {xFilter {SELECT rowid, a, b FROM 't6' WHERE b > ?} 8James}
-
-  1.2 "SELECT a FROM e6 WHERE b>='8' AND b<'9'" {3 4}
-    {xFilter {SELECT rowid, a, b FROM 't6' WHERE b >= ? AND b < ?} 8 9}
-
-  1.3 "SELECT a FROM e6 WHERE b LIKE '8J%'" {3 4}
-    {xFilter {SELECT rowid, a, b FROM 't6' WHERE b >= ? AND b < ? AND b like ?} 8J 8k 8J%}
-
-  1.4 "SELECT a FROM e6 WHERE b LIKE '8j%'" {3 4}
-    {xFilter {SELECT rowid, a, b FROM 't6' WHERE b >= ? AND b < ? AND b like ?} 8J 8k 8j%}
-
-  1.5 "SELECT a FROM e6 WHERE b LIKE '8%'" {3 4}
-    {xFilter {SELECT rowid, a, b FROM 't6' WHERE b like ?} 8%}
-} {
-  set echo_module {}
-  do_execsql_test 18.$tn.1 $sql $res
-  do_test         18.$tn.2 { lrange $::echo_module 2 end } $filter
+ifcapable !icu {
+  foreach {tn sql res filter} {
+    1.1 "SELECT a FROM e6 WHERE b>'8James'" {4 2 6 1 5}
+      {xFilter {SELECT rowid, a, b FROM 't6' WHERE b > ?} 8James}
+  
+    1.2 "SELECT a FROM e6 WHERE b>='8' AND b<'9'" {3 4}
+      {xFilter {SELECT rowid, a, b FROM 't6' WHERE b >= ? AND b < ?} 8 9}
+  
+    1.3 "SELECT a FROM e6 WHERE b LIKE '8J%'" {3 4}
+      {xFilter {SELECT rowid, a, b FROM 't6' WHERE b >= ? AND b < ? AND b like ?} 8J 8k 8J%}
+  
+    1.4 "SELECT a FROM e6 WHERE b LIKE '8j%'" {3 4}
+      {xFilter {SELECT rowid, a, b FROM 't6' WHERE b >= ? AND b < ? AND b like ?} 8J 8k 8j%}
+  
+    1.5 "SELECT a FROM e6 WHERE b LIKE '8%'" {3 4}
+      {xFilter {SELECT rowid, a, b FROM 't6' WHERE b like ?} 8%}
+  } {
+    set echo_module {}
+    do_execsql_test 18.$tn.1 $sql $res
+    do_test         18.$tn.2 { lrange $::echo_module 2 end } $filter
+  }
 }
 
 do_execsql_test 18.2.0 {  PRAGMA case_sensitive_like = ON }
--- /test/vtabH.test
+++ /test/vtabH.test
@@ -30,36 +30,38 @@
   CREATE VIRTUAL TABLE e6 USING echo(t6);
 }
 
-foreach {tn sql expect} {
-  1 "SELECT * FROM e6 WHERE b LIKE '8abc'" {
-    xBestIndex 
-       {SELECT rowid, a, b FROM 't6' WHERE b >= ? AND b < ? AND b like ?}
-    xFilter
-       {SELECT rowid, a, b FROM 't6' WHERE b >= ? AND b < ? AND b like ?}
-       8ABC 8abd 8abc
+ifcapable !icu {
+  foreach {tn sql expect} {
+    1 "SELECT * FROM e6 WHERE b LIKE '8abc'" {
+      xBestIndex 
+         {SELECT rowid, a, b FROM 't6' WHERE b >= ? AND b < ? AND b like ?}
+      xFilter
+         {SELECT rowid, a, b FROM 't6' WHERE b >= ? AND b < ? AND b like ?}
+         8ABC 8abd 8abc
+    }
+  
+    2 "SELECT * FROM e6 WHERE b GLOB '8abc'" {
+       xBestIndex
+         {SELECT rowid, a, b FROM 't6' WHERE b >= ? AND b < ? AND b glob ?}
+       xFilter
+         {SELECT rowid, a, b FROM 't6' WHERE b >= ? AND b < ? AND b glob ?}
+         8abc 8abd 8abc
+    }
+    3 "SELECT * FROM e6 WHERE b LIKE '8e/'" {
+      xBestIndex {SELECT rowid, a, b FROM 't6' WHERE b like ?}
+      xFilter {SELECT rowid, a, b FROM 't6' WHERE b like ?} 8e/
+    }
+    4 "SELECT * FROM e6 WHERE b GLOB '8e/'" {
+      xBestIndex {SELECT rowid, a, b FROM 't6' WHERE b glob ?}
+      xFilter {SELECT rowid, a, b FROM 't6' WHERE b glob ?} 8e/
+    }
+  } {
+    do_test 1.$tn {
+      set echo_module {}
+      execsql $sql
+      set ::echo_module
+    } [list {*}$expect]
   }
-
-  2 "SELECT * FROM e6 WHERE b GLOB '8abc'" {
-     xBestIndex
-       {SELECT rowid, a, b FROM 't6' WHERE b >= ? AND b < ? AND b glob ?}
-     xFilter
-       {SELECT rowid, a, b FROM 't6' WHERE b >= ? AND b < ? AND b glob ?}
-       8abc 8abd 8abc
-  }
-  3 "SELECT * FROM e6 WHERE b LIKE '8e/'" {
-    xBestIndex {SELECT rowid, a, b FROM 't6' WHERE b like ?}
-    xFilter {SELECT rowid, a, b FROM 't6' WHERE b like ?} 8e/
-  }
-  4 "SELECT * FROM e6 WHERE b GLOB '8e/'" {
-    xBestIndex {SELECT rowid, a, b FROM 't6' WHERE b glob ?}
-    xFilter {SELECT rowid, a, b FROM 't6' WHERE b glob ?} 8e/
-  }
-} {
-  do_test 1.$tn {
-    set echo_module {}
-    execsql $sql
-    set ::echo_module
-  } [list {*}$expect]
 }