Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Add test case for ticket [2abbf2c244]. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
8f68a04dccdcd107a0746253486f709e |
User & Date: | mistachkin 2016-06-15 20:25:28.525 |
Context
2016-06-17
| ||
17:35 | Update Eagle in externals to the beta 36 release. check-in: 9ef15e9c95 user: mistachkin tags: trunk | |
2016-06-15
| ||
20:25 | Add test case for ticket [2abbf2c244]. check-in: 8f68a04dcc user: mistachkin tags: trunk | |
20:22 | Prevent the SQLiteCommand.ExecuteScalar method from throwing an exception when there are no result columns. check-in: 29e1de6a30 user: mistachkin tags: trunk | |
Changes
Added Tests/tkt-2abbf2c244.eagle.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 | ############################################################################### # # tkt-2abbf2c244.eagle -- # # Written by Joe Mistachkin. # Released to the public domain, use at your own risk! # ############################################################################### package require Eagle package require Eagle.Library package require Eagle.Test runTestPrologue ############################################################################### package require System.Data.SQLite.Test runSQLiteTestPrologue ############################################################################### runTest {test tkt-2abbf2c244-1.1 {PRAGMA incremental_vacuum} -setup { setupDb [set fileName tkt-2abbf2c244-1.1.db] } -body { set result [list] lappend result [sql execute $db {PRAGMA page_size = 4096;}] lappend result [sql execute $db {PRAGMA auto_vacuum = INCREMENTAL;}] lappend result [sql execute -execute scalar $db {PRAGMA auto_vacuum;}] lappend result [file size [file join [getDatabaseDirectory] $fileName]] lappend result [sql execute $db { CREATE TABLE t1(x INTEGER, y TEXT); INSERT INTO t1 (x, y) VALUES(1, RANDOMBLOB(1048576)); INSERT INTO t1 (x, y) VALUES(2, RANDOMBLOB(1048576)); INSERT INTO t1 (x, y) VALUES(3, RANDOMBLOB(1048576)); INSERT INTO t1 (x, y) VALUES(4, RANDOMBLOB(1048576)); INSERT INTO t1 (x, y) VALUES(5, RANDOMBLOB(1048576)); INSERT INTO t1 (x, y) VALUES(6, RANDOMBLOB(1048576)); INSERT INTO t1 (x, y) VALUES(7, RANDOMBLOB(1048576)); INSERT INTO t1 (x, y) VALUES(8, RANDOMBLOB(1048576)); INSERT INTO t1 (x, y) VALUES(9, RANDOMBLOB(1048576)); }] lappend result [file size [file join [getDatabaseDirectory] $fileName]] lappend result [sql execute -execute scalar $db { SELECT COUNT(*) FROM t1; }] lappend result [sql execute -execute scalar $db { PRAGMA freelist_count; }] lappend result [sql execute $db { DELETE FROM t1 WHERE x < 5; }] lappend result [sql execute -execute scalar $db { SELECT COUNT(*) FROM t1; }] lappend result [sql execute -execute scalar $db { PRAGMA freelist_count; }] lappend result [file size [file join [getDatabaseDirectory] $fileName]] lappend result [sql execute -execute scalar $db { PRAGMA incremental_vacuum; }] lappend result [file size [file join [getDatabaseDirectory] $fileName]] lappend result [expr {[lindex $result end] < [lindex $result end-2]}] set result } -cleanup { cleanupDb $fileName unset -nocomplain result db fileName } -constraints \ {eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite} -result \ {-1 0 2 4096 9 9469952 9 0 4 5 1025 9469952 {} 9465856 True}} ############################################################################### runSQLiteTestEpilogue runTestEpilogue |