/ Check-in [3847faff55]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Add test script selectC.test which demonstrates ticket #3381. (CVS 5708)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 3847faff55d4bd7574785c3b18d5c95e687c7598
User & Date: drh 2008-09-16 15:09:54
Context
2008-09-16
15:50
Use (file nativename (pwd)) instead of just (pwd) to find the name of the current directory to pass to "PRAGMA temp_store_directory" in pragma.test. This helps the test pass on non-unix systems. (CVS 5709) check-in: 50feaa3707 user: danielk1977 tags: trunk
15:09
Add test script selectC.test which demonstrates ticket #3381. (CVS 5708) check-in: 3847faff55 user: drh tags: trunk
14:38
If the xAccess() call used by "PRAGMA temp_store_directory = /new/path/" to determine if the supplied directory is writable returns an error, assume the directory is not writable. (CVS 5707) check-in: e8418588f2 user: danielk1977 tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Added test/selectC.test.

            1  +# 2008 September 16
            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. 
           12  +#
           13  +# $Id: selectC.test,v 1.1 2008/09/16 15:09:54 drh Exp $
           14  +
           15  +set testdir [file dirname $argv0]
           16  +source $testdir/tester.tcl
           17  +
           18  +do_test selectC-1.1 {
           19  +  execsql {
           20  +    CREATE TABLE t1(a, b, c);
           21  +    INSERT INTO t1 VALUES(1,'aaa','bbb');
           22  +    INSERT INTO t1 SELECT * FROM t1;
           23  +    INSERT INTO t1 VALUES(2,'ccc','ddd');
           24  +
           25  +    SELECT DISTINCT a AS x, b||c AS y
           26  +      FROM t1
           27  +     WHERE y IN ('aaabbb','xxx');
           28  +  }
           29  +} {1 aaabbb}
           30  +do_test selectC-1.2 {
           31  +  execsql {
           32  +    SELECT DISTINCT a AS x, b||c AS y
           33  +      FROM t1
           34  +     WHERE b||c IN ('aaabbb','xxx');
           35  +  }
           36  +} {1 aaabbb}
           37  +do_test selectC-1.3 {
           38  +  execsql {
           39  +    SELECT DISTINCT a AS x, b||c AS y
           40  +      FROM t1
           41  +     WHERE y='aaabbb'
           42  +  }
           43  +} {1 aaabbb}
           44  +do_test selectC-1.4 {
           45  +  execsql {
           46  +    SELECT DISTINCT a AS x, b||c AS y
           47  +      FROM t1
           48  +     WHERE b||c='aaabbb'
           49  +  }
           50  +} {1 aaabbb}
           51  +do_test selectC-1.5 {
           52  +  execsql {
           53  +    SELECT DISTINCT a AS x, b||c AS y
           54  +      FROM t1
           55  +     WHERE x=2
           56  +  }
           57  +} {2 cccddd}
           58  +do_test selectC-1.6 {
           59  +  execsql {
           60  +    SELECT DISTINCT a AS x, b||c AS y
           61  +      FROM t1
           62  +     WHERE a=2
           63  +  }
           64  +} {2 cccddd}
           65  +do_test selectC-1.7 {
           66  +  execsql {
           67  +    SELECT DISTINCT a AS x, b||c AS y
           68  +      FROM t1
           69  +     WHERE +y='aaabbb'
           70  +  }
           71  +} {1 aaabbb}
           72  +
           73  +finish_test