gitlab.com/CoiaPrant/sqlite3@v1.19.1/testdata/tcl/expr2.test (about) 1 # 2019 May 20 2 # 3 # The author disclaims copyright to this source code. In place of 4 # a legal notice, here is a blessing: 5 # 6 # May you do good and not evil. 7 # May you find forgiveness for yourself and forgive others. 8 # May you share freely, never taking more than you give. 9 # 10 #*********************************************************************** 11 # This file implements regression tests for SQLite library. The 12 # focus of this file is testing expressions. 13 # 14 15 set testdir [file dirname $argv0] 16 source $testdir/tester.tcl 17 set testprefix expr2 18 19 do_execsql_test 1.0 { 20 CREATE TABLE t0(c0); 21 INSERT INTO t0(c0) VALUES ('val'); 22 } 23 24 do_execsql_test 1.1 { 25 SELECT * FROM t0 WHERE ( 26 ( (0 IS NOT FALSE) OR NOT (0 IS FALSE OR (t0.c0 = 1)) ) IS 0 27 ) 28 } {val} 29 30 do_execsql_test 1.2.1 { 31 SELECT 32 ( (0 IS NOT FALSE) OR NOT (0 IS FALSE OR (t0.c0 = 1)) ) IS 0 33 FROM t0 34 } {1} 35 36 do_execsql_test 1.2.2 { 37 SELECT 38 ( (0 IS NOT FALSE) OR NOT (0 IS 0 OR (t0.c0 = 1)) ) IS 0 39 FROM t0 40 } {1} 41 42 do_execsql_test 1.3 { 43 SELECT ( (0 IS NOT FALSE) OR NOT (0 IS FALSE OR (t0.c0 = 1)) ) FROM t0 44 } {0} 45 46 do_execsql_test 1.4.1 { 47 SELECT (0 IS NOT FALSE) FROM t0 48 } {0} 49 do_execsql_test 1.4.2 { 50 SELECT NOT (0 IS FALSE OR (t0.c0 = 1)) FROM t0 51 } {0} 52 53 54 finish_test