###############################################################################
#
# tkt-b4a7ddc83f.eagle --
#
# Written by Joe Mistachkin.
# Released to the public domain, use at your own risk!
#
###############################################################################
package require Eagle
package require EagleLibrary
package require EagleTest
runTestPrologue
###############################################################################
package require System.Data.SQLite.Test
runSQLiteTestPrologue
###############################################################################
#
# NOTE: Make sure that SQLite core library is completely shutdown prior to
# starting any of the tests in this file.
#
if {[haveConstraint SQLite]} then {
object invoke -flags +NonPublic System.Data.SQLite.UnsafeNativeMethods \
sqlite3_shutdown
}
###############################################################################
for {set i 1} {$i < 3} {incr i} {
runTest {test tkt-b4a7ddc83f-1.$i {logging shutdown} -setup \
[getAppDomainPreamble {
set appDomainId(1) {[object invoke AppDomain.CurrentDomain Id]}
set fileName {tkt-b4a7ddc83f-1.$i.db}
}] -body {
set appDomainId(2) [object invoke AppDomain.CurrentDomain Id]
package require EagleLibrary
package require EagleTest
package require System.Data.SQLite.Test
object load -loadtype File [file join [getBinaryDirectory] \
System.Data.SQLite.dll]
object invoke System.Data.SQLite.SQLiteLog Initialize
list $appDomainId(1) $appDomainId(2) \
[expr {$appDomainId(1) != $appDomainId(2)}] [setupDb $fileName]
} -cleanup {
cleanupDb $fileName
unset -nocomplain appDomainId db fileName
} -constraints {eagle monoBug28 command.sql compile.DATA\
compile.ISOLATED_INTERPRETERS SQLite System.Data.SQLite} -isolationLevel \
AppDomain -match regexp -result {^\d+ \d+ True SQLiteConnection#\d+$}}
}
###############################################################################
unset -nocomplain i
###############################################################################
runSQLiteTestEpilogue
runTestEpilogue