System.Data.SQLite

Check-in [a000fa4f91]
Login

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

Overview
Comment:Modify test case.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | tkt-449885cc57
Files: files | file ages | folders
SHA1: a000fa4f912f59eb09a54a877f006a111ae41f79
User & Date: mistachkin 2015-06-15 05:58:10.716
Context
2015-06-15
05:58
Modify test case. Closed-Leaf check-in: a000fa4f91 user: mistachkin tags: tkt-449885cc57
2015-06-13
20:46
Add test cases for ticket [449885cc57]. check-in: e087483fc3 user: mistachkin tags: tkt-449885cc57
Changes
Unified Diff Ignore Whitespace Patch
Changes to Tests/tkt-449885cc57.eagle.
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

package require System.Data.SQLite.Test
runSQLiteTestPrologue

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

runTest {test tkt-449885cc57-1.1 {Data Source with unescaped "#"} -setup {



  file mkdir [set directory [file join [getDatabaseDirectory] C#]]



  set fileName [file join $directory tkt-449885cc57-1.1.db]


  setupDb $fileName "" "" "" "" "" false
} -body {
  sql execute $db "CREATE TABLE t1(x);"
  sql execute $db "INSERT INTO t1 (x) VALUES(1);"

  list [file exists $fileName] \
      [sql execute -execute scalar $db "SELECT x FROM t1;"]
} -cleanup {
  cleanupDb $fileName db true false

  file rmdir $directory; # NOTE: Should now be empty.








  unset -nocomplain db fileName directory
} -constraints {eagle monoBug28 command.sql compile.DATA SQLite\
System.Data.SQLite} -result {True 1}}

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

runTest {test tkt-449885cc57-1.2 {Data Source with escaped "#"} -setup {
  file mkdir [set directory [file join [getDatabaseDirectory] C#]]







>
>
>
|
>
>
>


>
|










>

>
>
>
>
>
>
|







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

package require System.Data.SQLite.Test
runSQLiteTestPrologue

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

runTest {test tkt-449885cc57-1.1 {Data Source with unescaped "#"} -setup {
  set savedDataDirectory [object invoke -create \
      AppDomain CurrentDomain.GetData DataDirectory]

  set directory [file join [getDatabaseDirectory] C#]
  object invoke AppDomain CurrentDomain.SetData DataDirectory $directory

  file mkdir $directory
  set fileName [file join $directory tkt-449885cc57-1.1.db]

  setupDb [appendArgs |DataDirectory| [file tail $fileName]] \
      "" "" "" "" "" false false
} -body {
  sql execute $db "CREATE TABLE t1(x);"
  sql execute $db "INSERT INTO t1 (x) VALUES(1);"

  list [file exists $fileName] \
      [sql execute -execute scalar $db "SELECT x FROM t1;"]
} -cleanup {
  cleanupDb $fileName db true false

  file rmdir $directory; # NOTE: Should now be empty.
  unset -nocomplain db fileName directory

  catch {
    object invoke AppDomain CurrentDomain.SetData DataDirectory \
        [expr {[string length $savedDataDirectory] > 0 ? \
        $savedDataDirectory : "null"}]
  }

  unset -nocomplain savedDataDirectory
} -constraints {eagle monoBug28 command.sql compile.DATA SQLite\
System.Data.SQLite} -result {True 1}}

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

runTest {test tkt-449885cc57-1.2 {Data Source with escaped "#"} -setup {
  file mkdir [set directory [file join [getDatabaseDirectory] C#]]
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69

  list [file exists $fileName] \
      [sql execute -execute scalar $db "SELECT x FROM t1;"]
} -cleanup {
  cleanupDb $fileName db true false

  file rmdir $directory; # NOTE: Should now be empty.

  unset -nocomplain db fileName directory
} -constraints {eagle monoBug28 command.sql compile.DATA SQLite\
System.Data.SQLite} -result {True 1}}

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

runSQLiteTestEpilogue
runTestEpilogue







<








68
69
70
71
72
73
74

75
76
77
78
79
80
81
82

  list [file exists $fileName] \
      [sql execute -execute scalar $db "SELECT x FROM t1;"]
} -cleanup {
  cleanupDb $fileName db true false

  file rmdir $directory; # NOTE: Should now be empty.

  unset -nocomplain db fileName directory
} -constraints {eagle monoBug28 command.sql compile.DATA SQLite\
System.Data.SQLite} -result {True 1}}

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

runSQLiteTestEpilogue
runTestEpilogue