aboutsummaryrefslogtreecommitdiff
path: root/test/expr.test
diff options
context:
space:
mode:
Diffstat (limited to 'test/expr.test')
-rw-r--r--test/expr.test22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/expr.test b/test/expr.test
index 7a6d47725..edef3486a 100644
--- a/test/expr.test
+++ b/test/expr.test
@@ -977,6 +977,28 @@ do_execsql_test expr-13.9 {
SELECT '' <= "";
} {1}
+# 2018-02-26. Ticket https://www.sqlite.org/src/tktview/36fae083b450e3af85
+#
+do_execsql_test expr-14.1 {
+ DROP TABLE IF EXISTS t1;
+ CREATE TABLE t1(x);
+ INSERT INTO t1 VALUES(0),(1),(NULL),(0.5),('1x'),('0x');
+ SELECT count(*) FROM t1
+ WHERE (x OR (8==9)) != (CASE WHEN x THEN 1 ELSE 0 END);
+} {0}
+do_execsql_test expr-14.2 {
+ SELECT count(*) FROM t1
+ WHERE (x OR (8==9)) != (NOT NOT x);
+} {0}
+do_execsql_test expr-14.3 {
+ SELECT sum(NOT x) FROM t1
+ WHERE x
+} {0}
+do_execsql_test expr-14.4 {
+ SELECT sum(CASE WHEN x THEN 0 ELSE 1 END) FROM t1
+ WHERE x
+} {0}
+
finish_test