Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Centralize save/restore handling (in the test suite) for environment variables. Stop leaking a variable in tests data-1.79 and data-1.80. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
7d3501975ee234d571f512dec4606e55 |
User & Date: | mistachkin 2016-03-21 16:15:25.413 |
Context
2016-03-21
| ||
21:46 | Preliminary work on getting the test suite to run under Mono on Unix. check-in: 085a9f8b8f user: mistachkin tags: trunk | |
16:18 | Add preliminary test for ticket [53633bbe39]. check-in: a5653a0674 user: mistachkin tags: tkt-53633bbe39 | |
16:15 | Centralize save/restore handling (in the test suite) for environment variables. Stop leaking a variable in tests data-1.79 and data-1.80. check-in: 7d3501975e user: mistachkin tags: trunk | |
2016-03-11
| ||
00:35 | Update scheduled release date for 1.0.100.0. check-in: 03b5dd0462 user: mistachkin tags: trunk | |
Changes
Changes to Tests/basic.eagle.
︙ | ︙ | |||
17 18 19 20 21 22 23 | package require System.Data.SQLite.Test runSQLiteTestPrologue runSQLiteTestFilesPrologue ############################################################################### | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | package require System.Data.SQLite.Test runSQLiteTestPrologue runSQLiteTestFilesPrologue ############################################################################### runTest {test data-1.1 {unit tests from the 'test' project} -setup { cleanupFile [file join [file dirname $testExeFile] Test.db3] set fileName [file join [getDatabaseDirectory] data-1.1.db] } -body { set output "" set code [catch { |
︙ | ︙ | |||
3201 3202 3203 3204 3205 3206 3207 | unset -nocomplain connection db fileName savedEnv } -constraints {eagle command.object monoBug28 command.sql compile.DATA SQLite\ System.Data.SQLite} -result {{DetectTextAffinity, DetectStringType}\ {DetectTextAffinity, DetectStringType}}} ############################################################################### | < < < < < | 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 | unset -nocomplain connection db fileName savedEnv } -constraints {eagle command.object monoBug28 command.sql compile.DATA SQLite\ System.Data.SQLite} -result {{DetectTextAffinity, DetectStringType}\ {DetectTextAffinity, DetectStringType}}} ############################################################################### runTest {test data-1.70 {LINQ w/String.Substring Method} -body { # # NOTE: Re-copy the reference database file used for this unit test to the # build directory in case it has been changed by a previous test run. # file copy -force $northwindEfDbFile \ [file join [getBuildDirectory] [file tail $northwindEfDbFile]] |
︙ | ︙ | |||
4051 4052 4053 4054 4055 4056 4057 | } sql execute -execute reader -format list -datetimeformat \ [getDateTimeFormat] $db "SELECT x, y FROM t1;" } -cleanup { cleanupDb $fileName | | | 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 | } sql execute -execute reader -format list -datetimeformat \ [getDateTimeFormat] $db "SELECT x, y FROM t1;" } -cleanup { cleanupDb $fileName unset -nocomplain result db fileName } -constraints \ {eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite} -result \ {1 {2038-01-20 00:00:00}}} ############################################################################### runTest {test data-1.80 {page size using PRAGMA} -setup { |
︙ | ︙ | |||
4086 4087 4088 4089 4090 4091 4092 | lappend result [sql execute -execute scalar $db { PRAGMA page_size; }] } -cleanup { cleanupDb $fileName | | | 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 | lappend result [sql execute -execute scalar $db { PRAGMA page_size; }] } -cleanup { cleanupDb $fileName unset -nocomplain result db fileName } -constraints \ {eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite} -result \ {1024 -1 1 4096}} ############################################################################### reportSQLiteResources $test_channel ############################################################################### runSQLiteTestFilesEpilogue runSQLiteTestEpilogue runTestEpilogue |
Changes to Tests/tkt-3c00ec5b52.eagle.
︙ | ︙ | |||
16 17 18 19 20 21 22 | ############################################################################### package require System.Data.SQLite.Test runSQLiteTestPrologue ############################################################################### | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | ############################################################################### package require System.Data.SQLite.Test runSQLiteTestPrologue ############################################################################### runTest {test tkt-3c00ec5b52-1.1 {default types, via connection} -setup { setupDb [set fileName tkt-3c00ec5b52-1.1.db] "" "" "" UseConnectionTypes \ "DefaultDbType=String;DefaultTypeName=TEXT;" } -body { set connection [getDbConnection] set result [list] |
︙ | ︙ | |||
197 198 199 200 201 202 203 | cleanupDb $fileName restoreSQLiteConvertEnvironment unset -nocomplain db fileName savedEnv } -constraints {eagle command.object monoBug28 command.sql compile.DATA SQLite\ System.Data.SQLite} -result {{t1 sqlite_autoindex_t1_1 True}}} | < < < < < | 159 160 161 162 163 164 165 166 167 168 169 | cleanupDb $fileName restoreSQLiteConvertEnvironment unset -nocomplain db fileName savedEnv } -constraints {eagle command.object monoBug28 command.sql compile.DATA SQLite\ System.Data.SQLite} -result {{t1 sqlite_autoindex_t1_1 True}}} ############################################################################### runSQLiteTestEpilogue runTestEpilogue |
Changes to lib/System.Data.SQLite/common.eagle.
︙ | ︙ | |||
2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 | # NOTE: This is self-cleaning. If no saved environment variables now # exist, remove the array. # if {[array size savedEnv] == 0} then { unset -nocomplain savedEnv } } proc setupDbInterruptCallback { channel log } { tputs $channel "---- setting up debugger interrupt callback... " if {[catch { saveEnvironmentVariables [list \ quietFindInterpreterTestPath quietSetupInterpreterTestPath] | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 | # NOTE: This is self-cleaning. If no saved environment variables now # exist, remove the array. # if {[array size savedEnv] == 0} then { unset -nocomplain savedEnv } } proc saveSQLiteConnectionEnvironment {} { upvar 1 savedEnv savedEnv saveEnvironmentVariables [list \ DefaultFlags_SQLiteConnection No_SQLiteConnectionNewParser] \ savedEnv } proc restoreSQLiteConnectionEnvironment {} { upvar 1 savedEnv savedEnv restoreEnvironmentVariables [list \ DefaultFlags_SQLiteConnection No_SQLiteConnectionNewParser] \ savedEnv } proc saveSQLiteConvertEnvironment {} { upvar 1 savedEnv savedEnv saveEnvironmentVariables [list \ Use_SQLiteConvert_DefaultDbType Use_SQLiteConvert_DefaultTypeName] \ savedEnv } proc restoreSQLiteConvertEnvironment {} { upvar 1 savedEnv savedEnv restoreEnvironmentVariables [list \ Use_SQLiteConvert_DefaultDbType Use_SQLiteConvert_DefaultTypeName] \ savedEnv } proc setupDbInterruptCallback { channel log } { tputs $channel "---- setting up debugger interrupt callback... " if {[catch { saveEnvironmentVariables [list \ quietFindInterpreterTestPath quietSetupInterpreterTestPath] |
︙ | ︙ |