System.Data.SQLite
Check-in [4960a565c2]
Not logged in

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

Overview
Comment:Add test case for ticket [6c6ecccc5f].
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 4960a565c293b289003f39f2c716950f3c3e16d5
User & Date: mistachkin 2012-10-26 00:25:50
References
2012-12-17
23:16 Ticket [ae5267b863] AccessViolationException during object disposal status still Open with 3 other changes artifact: 9b5d52935f user: mistachkin
2012-10-26
00:46 Ticket [6c6ecccc5f] access violation with CommandBehavior.CloseConnection status still Open with 1 other change artifact: cbc1424a69 user: mistachkin
00:27 Ticket [6c6ecccc5f]: 1 change artifact: 0ba11c1fd6 user: mistachkin
Context
2012-10-26
00:57
Update SQLite core library to the latest trunk. Fix for ticket [6c6ecccc5f]. check-in: e702fa192f user: mistachkin tags: trunk
00:25
Add test case for ticket [6c6ecccc5f]. check-in: 4960a565c2 user: mistachkin tags: trunk
2012-10-24
21:00
Add some notes about the PreLoadSQLite_BaseDirectory environment variable to the docs. check-in: 4e29eb132c user: mistachkin tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Added Tests/tkt-6c6ecccc5f.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
###############################################################################
#
# tkt-6c6ecccc5f.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-6c6ecccc5f-1.1 {CloseConnection with extensions} -setup {
  setupDb [set fileName tkt-6c6ecccc5f-1.1.db]
} -body {
  sql execute $db {
    CREATE VIRTUAL TABLE t1 USING fts4(x TEXT);
    INSERT INTO t1 (x) VALUES('one');
    INSERT INTO t1 (x) VALUES('two');
  }

  set id [object invoke Interpreter.GetActive NextId]
  set dataSource [file join [getDatabaseDirectory] $fileName]
  set sql "SELECT x FROM t1 WHERE x MATCH 'one' ORDER BY x;"

  unset -nocomplain results errors

  set code [compileCSharpWith [subst {
    using System.Data;
    using System.Data.SQLite;

    namespace _Dynamic${id}
    {
      public static class Test${id}
      {
        public static void Main()
        {
          using (SQLiteConnection connection = new SQLiteConnection(
              "Data Source=${dataSource};"))
          {
            connection.Open();

            using (SQLiteCommand command = new SQLiteCommand("${sql}",
                connection))
            {
              command.ExecuteReader(CommandBehavior.CloseConnection);
            }
          }
        }
      }
    }
  }] true true true results errors System.Data.SQLite.dll]

  list $code $results \
      [expr {[info exists errors] ? $errors : ""}] \
      [expr {$code eq "Ok" ? [catch {
        object invoke _Dynamic${id}.Test${id} Main
      } result] : [set result ""]}] $result
} -cleanup {
  cleanupDb $fileName

  unset -nocomplain result results errors code sql dataSource id db fileName
} -constraints \
{eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite} \
-match regexp -result {^Ok System#CodeDom#Compiler#CompilerResults#\d+ \{\} 0\
\{\}$}}

###############################################################################

runSQLiteTestEpilogue
runTestEpilogue