System.Data.SQLite
Check-in [e161b486c4]
Not logged in

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

Overview
Comment:Enhance test suite infrastructure to make it work properly without the interop assembly.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: e161b486c4d9b0f04e21838968f23161b5b7eeb8
User & Date: mistachkin 2015-08-12 20:15:41
Context
2015-08-12
20:24
Enhance the clean batch tool for Visual Studio 2015. check-in: 21952064b2 user: mistachkin tags: trunk
20:15
Enhance test suite infrastructure to make it work properly without the interop assembly. check-in: e161b486c4 user: mistachkin tags: trunk
19:59
Revise and extend compilation fixes from the previous check-in. check-in: 9582604b8d user: mistachkin tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to Tests/basic.eagle.

  2379   2379         "SELECT replicate('1234', 4);"} output] $output
  2380   2380   
  2381   2381     set result
  2382   2382   } -cleanup {
  2383   2383     cleanupDb $fileName
  2384   2384   
  2385   2385     unset -nocomplain output result db fileName
  2386         -} -constraints \
  2387         -{eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite} -match \
  2388         -regexp -result {^0 12341234 1 \{System\.Data\.SQLite\.SQLiteException\
  2389         -\(0x80004005\): SQL logic error or missing database.*?\} 0 1234123412341234$}}
         2386  +} -constraints {eagle monoBug28 command.sql compile.DATA SQLite\
         2387  +System.Data.SQLite SQLiteInterop\
         2388  +defineConstant.System.Data.SQLite.INTEROP_EXTENSION_FUNCTIONS} -match regexp \
         2389  +-result {^0 12341234 1 \{System\.Data\.SQLite\.SQLiteException \(0x80004005\):\
         2390  +SQL logic error or missing database.*?\} 0 1234123412341234$}}
  2390   2391   
  2391   2392   ###############################################################################
  2392   2393   
  2393   2394   runTest {test data-1.50 {column name and index lookup} -setup {
  2394   2395     setupDb [set fileName data-1.50.db]
  2395   2396   } -body {
  2396   2397     sql execute $db {
................................................................................
  2694   2695   
  2695   2696     unset -nocomplain result connection
  2696   2697   
  2697   2698     cleanupDb $fileName
  2698   2699   
  2699   2700     unset -nocomplain db fileName
  2700   2701   } -constraints {eagle command.object monoBug28 command.sql compile.DATA SQLite\
  2701         -System.Data.SQLite} -result {1 {} 1.01 {}}}
         2702  +System.Data.SQLite SQLiteInterop} -result {1 {} 1.01 {}}}
  2702   2703   
  2703   2704   ###############################################################################
  2704   2705   
  2705   2706   runTest {test data-1.57 {regexp extension} -setup {
  2706   2707     setupDb [set fileName data-1.57.db]
  2707   2708   } -body {
  2708   2709     unset -nocomplain pattern result
................................................................................
  2754   2755   
  2755   2756     unset -nocomplain pattern result connection
  2756   2757   
  2757   2758     cleanupDb $fileName
  2758   2759   
  2759   2760     unset -nocomplain db fileName
  2760   2761   } -constraints {eagle command.object monoBug28 command.sql compile.DATA SQLite\
  2761         -System.Data.SQLite} -result {0 1 1 {unmatched '('} 0 1 1 {unmatched '('} 0 0 1\
  2762         -{unmatched '('} 0 0 1 {unmatched '('}}}
         2762  +System.Data.SQLite SQLiteInterop} -result {0 1 1 {unmatched '('} 0 1 1\
         2763  +{unmatched '('} 0 0 1 {unmatched '('} 0 0 1 {unmatched '('}}}
  2763   2764   
  2764   2765   ###############################################################################
  2765   2766   
  2766   2767   reportSQLiteResources $test_channel
  2767   2768   
  2768   2769   ###############################################################################
  2769   2770   
................................................................................
  2836   2837   
  2837   2838     unset -nocomplain result connection
  2838   2839   
  2839   2840     cleanupDb $fileName
  2840   2841   
  2841   2842     unset -nocomplain db fileName
  2842   2843   } -constraints {eagle command.object monoBug28 command.sql compile.DATA SQLite\
  2843         -System.Data.SQLite} -result {0 4 -1 1.75}}
         2844  +System.Data.SQLite SQLiteInterop} -result {0 4 -1 1.75}}
  2844   2845   
  2845   2846   ###############################################################################
  2846   2847   
  2847   2848   runTest {test data-1.60 {per-connection type mappings} -setup {
  2848   2849     setupDb [set fileName data-1.60.db] "" "" "" UseConnectionTypes
  2849   2850   } -body {
  2850   2851     set connection [getDbConnection]
................................................................................
  3276   3277   
  3277   3278     unset -nocomplain x result connection
  3278   3279   
  3279   3280     cleanupDb $fileName
  3280   3281   
  3281   3282     unset -nocomplain db fileName
  3282   3283   } -constraints {eagle command.object monoBug28 command.sql compile.DATA SQLite\
  3283         -System.Data.SQLite} -match regexp -result {^\{fts5: \d{4}-\d{2}-\d{2}\
  3284         -\d{2}:\d{2}:\d{2} [0-9a-f]{40}\} \{\} \{\} \{\} \{\} \{\} \{rowid 3 x horse\
  3285         -rowid 4 x house\}$}}
         3284  +System.Data.SQLite SQLiteInterop} -match regexp -result \
         3285  +{^\{fts5: \d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2} [0-9a-f]{40}\} \{\} \{\} \{\}\
         3286  +\{\} \{\} \{rowid 3 x horse rowid 4 x house\}$}}
  3286   3287   
  3287   3288   ###############################################################################
  3288   3289   
  3289   3290   runTest {test data-1.72 {unbind function from a connection} -setup {
  3290   3291     set fileName data-1.72.db
  3291   3292   } -body {
  3292   3293     set id [object invoke Interpreter.GetActive NextId]

Changes to Tests/linq.eagle.

    87     87     } else {
    88     88       lappend result [string trim $error]
    89     89     }
    90     90   
    91     91     set result
    92     92   } -cleanup {
    93     93     unset -nocomplain code output error result
    94         -} -constraints {eagle monoToDo SQLite file_System.Data.SQLite.dll testExec\
    95         -file_System.Data.SQLite.Linq.dll file_testlinq.exe file_northwindEF.db} \
    96         --result {0 {{ NewUnitPrice = 21.0 } { NewUnitPrice = 21.1 } { NewUnitPrice =\
    97         -21.05 } { NewUnitPrice = 23.0 } { NewUnitPrice = 23.3 } { NewUnitPrice = 23.25\
    98         -} { NewUnitPrice = 21.0 } { NewUnitPrice = 21.4 } { NewUnitPrice = 21.35 }}}}
           94  +} -constraints {eagle System.Data.SQLite.dll_v4.0.30319 monoToDo SQLite\
           95  +file_System.Data.SQLite.dll testExec file_System.Data.SQLite.Linq.dll\
           96  +file_testlinq.exe file_northwindEF.db} -result {0 {{ NewUnitPrice = 21.0 } {\
           97  +NewUnitPrice = 21.1 } { NewUnitPrice = 21.05 } { NewUnitPrice = 23.0 } {\
           98  +NewUnitPrice = 23.3 } { NewUnitPrice = 23.25 } { NewUnitPrice = 21.0 } {\
           99  +NewUnitPrice = 21.4 } { NewUnitPrice = 21.35 }}}}
    99    100   
   100    101   ###############################################################################
   101    102   
   102    103   runSQLiteTestFilesEpilogue
   103    104   runSQLiteTestEpilogue
   104    105   runTestEpilogue

Changes to Tests/tkt-964063da16.eagle.

    53     53         System.Data.SQLite.SQLiteConnection \
    54     54         "Data Source=:memory:;NoDefaultFlags=False;"]
    55     55   
    56     56     $connection Flags NoExtensionFunctions; $connection Open
    57     57     $connection Flags
    58     58   } -cleanup {
    59     59     unset -nocomplain connection
    60         -} -constraints {eagle command.object SQLite System.Data.SQLite} -result \
    61         -{NoExtensionFunctions, Default}}
           60  +} -constraints {eagle command.object SQLite System.Data.SQLite} -match regexp \
           61  +-result {^(?:Default, NoExtensionFunctions|NoExtensionFunctions, Default)$}}
    62     62   
    63     63   ###############################################################################
    64     64   
    65     65   runTest {test tkt-964063da16-1.4 {pre-existing connection flags} -body {
    66     66     set connection [object create -alias \
    67     67         System.Data.SQLite.SQLiteConnection \
    68     68         "Data Source=:memory:;NoDefaultFlags=True;"]

Changes to lib/System.Data.SQLite/common.eagle.

  1519   1519           #       so, make it easy to spot.
  1520   1520           #
  1521   1521           if {[string length $sourceId] == 0} then {
  1522   1522             set sourceId null
  1523   1523           }
  1524   1524   
  1525   1525           #
  1526         -        # NOTE: Yes, the SQLite interop assembly appears to be available.
         1526  +        # NOTE: Before actually adding the test constraint, make sure the
         1527  +        #       version is valid (i.e. not just that we could query it).
  1527   1528           #
  1528         -        addConstraint SQLiteInterop
         1529  +        if {$version ne "null"} then {
         1530  +          #
         1531  +          # NOTE: Yes, the SQLite interop assembly appears to be available.
         1532  +          #
         1533  +          addConstraint SQLiteInterop
  1529   1534   
  1530         -        tputs $channel [appendArgs "yes (" $version " " $sourceId ")\n"]
         1535  +          set answer yes
         1536  +        } else {
         1537  +          set answer no
         1538  +        }
         1539  +
         1540  +        tputs $channel [appendArgs $answer " (" $version " " $sourceId ")\n"]
  1531   1541         } else {
  1532   1542           tputs $channel no\n
  1533   1543         }
  1534   1544       }
  1535   1545   
  1536   1546       proc checkForSQLiteDefineConstant { channel name } {
  1537   1547         tputs $channel [appendArgs \