]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Add test script selectC.test which demonstrates ticket #3381. (CVS 5708)
authordrh <drh@noemail.net>
Tue, 16 Sep 2008 15:09:53 +0000 (15:09 +0000)
committerdrh <drh@noemail.net>
Tue, 16 Sep 2008 15:09:53 +0000 (15:09 +0000)
FossilOrigin-Name: 3847faff55d4bd7574785c3b18d5c95e687c7598

manifest
manifest.uuid
test/selectC.test [new file with mode: 0644]

index 521e83a28a6fad255c2b0d17987ef664bb89896b..7e475031313464582edfbfaad5d2a716fc3829fe 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C If\sthe\sxAccess()\scall\sused\sby\s"PRAGMA\stemp_store_directory\s=\s/new/path/"\sto\sdetermine\sif\sthe\ssupplied\sdirectory\sis\swritable\sreturns\san\serror,\sassume\sthe\sdirectory\sis\snot\swritable.\s(CVS\s5707)
-D 2008-09-16T14:38:03
+C Add\stest\sscript\sselectC.test\swhich\sdemonstrates\sticket\s#3381.\s(CVS\s5708)
+D 2008-09-16T15:09:54
 F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
 F Makefile.in d15a7ebfe5e057a72a49805ffb302dbb601c8329
 F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
@@ -480,6 +480,7 @@ F test/select8.test 391de11bdd52339c30580dabbbbe97e3e9a3c79d
 F test/select9.test b4007b15396cb7ba2615cab31e1973b572e43210
 F test/selectA.test 06d1032fa9009314c95394f2ca2e60d9f7ae8532
 F test/selectB.test 31e81ac9af7d224850e0706350f070ecb92fcbc7
+F test/selectC.test fbce7d0dce38e9328502fd5ed3466ee1dc4ca7c5
 F test/server1.test f5b790d4c0498179151ca8a7715a65a7802c859c
 F test/shared.test b9f3bbd3ba727c5f1f8c815b7d0199262aacf214
 F test/shared2.test 0ee9de8964d70e451936a48c41cb161d9134ccf4
@@ -636,7 +637,7 @@ F tool/speedtest16.c c8a9c793df96db7e4933f0852abb7a03d48f2e81
 F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
 F tool/speedtest8.c 1dbced29de5f59ba2ebf877edcadf171540374d1
 F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
-P 2d4505510032bf903a9c5d582edda442a0592c77
-R 2996f0a258d4d9a1b26c7a1bf3e80edf
-U danielk1977
-Z d865bbdb4adfc742b05c90684125e5c6
+P e8418588f2c23487cefda702849d4546202fd8ec
+R 73ad7181d5aeabe99d686cb75c5c2a82
+U drh
+Z f6e3bbff74612bd9d3803b70b020f13a
index fdb1d975ca16eecb9dbe3e81d6fddd323e64bb44..1172c826544e0a06490dcf91da02fdfafcc20d75 100644 (file)
@@ -1 +1 @@
-e8418588f2c23487cefda702849d4546202fd8ec
\ No newline at end of file
+3847faff55d4bd7574785c3b18d5c95e687c7598
\ No newline at end of file
diff --git a/test/selectC.test b/test/selectC.test
new file mode 100644 (file)
index 0000000..1264a36
--- /dev/null
@@ -0,0 +1,73 @@
+# 2008 September 16
+#
+# The author disclaims copyright to this source code.  In place of
+# a legal notice, here is a blessing:
+#
+#    May you do good and not evil.
+#    May you find forgiveness for yourself and forgive others.
+#    May you share freely, never taking more than you give.
+#
+#***********************************************************************
+# This file implements regression tests for SQLite library. 
+#
+# $Id: selectC.test,v 1.1 2008/09/16 15:09:54 drh Exp $
+
+set testdir [file dirname $argv0]
+source $testdir/tester.tcl
+
+do_test selectC-1.1 {
+  execsql {
+    CREATE TABLE t1(a, b, c);
+    INSERT INTO t1 VALUES(1,'aaa','bbb');
+    INSERT INTO t1 SELECT * FROM t1;
+    INSERT INTO t1 VALUES(2,'ccc','ddd');
+
+    SELECT DISTINCT a AS x, b||c AS y
+      FROM t1
+     WHERE y IN ('aaabbb','xxx');
+  }
+} {1 aaabbb}
+do_test selectC-1.2 {
+  execsql {
+    SELECT DISTINCT a AS x, b||c AS y
+      FROM t1
+     WHERE b||c IN ('aaabbb','xxx');
+  }
+} {1 aaabbb}
+do_test selectC-1.3 {
+  execsql {
+    SELECT DISTINCT a AS x, b||c AS y
+      FROM t1
+     WHERE y='aaabbb'
+  }
+} {1 aaabbb}
+do_test selectC-1.4 {
+  execsql {
+    SELECT DISTINCT a AS x, b||c AS y
+      FROM t1
+     WHERE b||c='aaabbb'
+  }
+} {1 aaabbb}
+do_test selectC-1.5 {
+  execsql {
+    SELECT DISTINCT a AS x, b||c AS y
+      FROM t1
+     WHERE x=2
+  }
+} {2 cccddd}
+do_test selectC-1.6 {
+  execsql {
+    SELECT DISTINCT a AS x, b||c AS y
+      FROM t1
+     WHERE a=2
+  }
+} {2 cccddd}
+do_test selectC-1.7 {
+  execsql {
+    SELECT DISTINCT a AS x, b||c AS y
+      FROM t1
+     WHERE +y='aaabbb'
+  }
+} {1 aaabbb}
+
+finish_test