System.Data.SQLite
Check-in [8b5a097e13]
Not logged in

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

Overview
Comment:Add tests for ticket [53633bbe39].
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 8b5a097e13532566078a10291f0e366434bc488d
User & Date: mistachkin 2016-04-01 00:23:00
Context
2016-04-01
00:43
Corrections to the test case for ticket [53633bbe39]. check-in: 67e11dee53 user: mistachkin tags: trunk
00:23
Add tests for ticket [53633bbe39]. check-in: 8b5a097e13 user: mistachkin tags: trunk
00:15
Merge updates from the 1.0.99 branch. check-in: 72134847ca user: mistachkin tags: trunk
2016-03-21
21:35
Work in progress on the test for ticket [53633bbe39]. Closed-Leaf check-in: 56a4359338 user: mistachkin tags: tkt-53633bbe39
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to Setup/data/verify.lst.

   797    797     Tests/tkt-41aea496e0.eagle
   798    798     Tests/tkt-448d663d11.eagle
   799    799     Tests/tkt-47c6fa04d3.eagle
   800    800     Tests/tkt-47f4bac575.eagle
   801    801     Tests/tkt-48a6b8e4ca.eagle
   802    802     Tests/tkt-4a791e70ab.eagle
   803    803     Tests/tkt-5251bd0878.eagle
          804  +  Tests/tkt-53633bbe39.eagle
   804    805     Tests/tkt-544dba0a2f.eagle
   805    806     Tests/tkt-56b42d99c1.eagle
   806    807     Tests/tkt-58ed318f2f.eagle
   807    808     Tests/tkt-59edc1018b.eagle
   808    809     Tests/tkt-6434e23a0f.eagle
   809    810     Tests/tkt-647d282d11.eagle
   810    811     Tests/tkt-6c6ecccc5f.eagle

Added Tests/tkt-53633bbe39.eagle.

            1  +###############################################################################
            2  +#
            3  +# tkt-53633bbe39.eagle --
            4  +#
            5  +# Written by Joe Mistachkin.
            6  +# Released to the public domain, use at your own risk!
            7  +#
            8  +###############################################################################
            9  +
           10  +package require Eagle
           11  +package require Eagle.Library
           12  +package require Eagle.Test
           13  +
           14  +runTestPrologue
           15  +
           16  +###############################################################################
           17  +
           18  +package require System.Data.SQLite.Test
           19  +runSQLiteTestPrologue
           20  +
           21  +###############################################################################
           22  +
           23  +runTest {test tkt-53633bbe39-1.1 {column affinity overrides} -setup {
           24  +  saveSQLiteConnectionEnvironment
           25  +  saveSQLiteConvertEnvironment
           26  +
           27  +  set env(DefaultFlags_SQLiteConnection) "DetectTextAffinity, DetectStringType"
           28  +  set env(Use_SQLiteConvert_DefaultDbType) String
           29  +  set env(Use_SQLiteConvert_DefaultTypeName) TEXT
           30  +
           31  +  setupDb [set fileName tkt-53633bbe39-1.1.db]
           32  +} -body {
           33  +  sql execute $db {
           34  +    CREATE TABLE t1(x);
           35  +    INSERT INTO t1 (x) VALUES(NULL);
           36  +    INSERT INTO t1 (x) VALUES(1);
           37  +    INSERT INTO t1 (x) VALUES(2.0);
           38  +    INSERT INTO t1 (x) VALUES(3.14159);
           39  +  }
           40  +
           41  +  set dataReader [sql execute -execute reader -format datareader \
           42  +      -alias $db "SELECT x FROM t1 ORDER BY x;"]
           43  +
           44  +  set results [list]
           45  +
           46  +  while {[$dataReader Read]} {
           47  +    set result [list]
           48  +
           49  +    lappend result [catch {$dataReader GetString 0} result] $result
           50  +    lappend result [catch {$dataReader GetValue 0} result] $result
           51  +
           52  +    lappend results $result
           53  +  }
           54  +
           55  +  set results
           56  +} -cleanup {
           57  +  cleanupDb $fileName
           58  +  restoreSQLiteConvertEnvironment
           59  +  restoreSQLiteConnectionEnvironment
           60  +
           61  +  unset -nocomplain result results db fileName savedEnv
           62  +} -constraints \
           63  +{eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite} -result {}}
           64  +
           65  +###############################################################################
           66  +
           67  +runSQLiteTestEpilogue
           68  +runTestEpilogue