System.Data.SQLite
Check-in [99befef947]
Not logged in

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

Overview
Comment:Add tests.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | tkt-3567020edf
Files: files | file ages | folders
SHA1: 99befef947dc4db43d158b77f9ca7de78e41d187
User & Date: mistachkin 2013-03-06 22:37:20
Context
2013-03-06
23:05
Properly handle embedded NUL characters in parameter and column values. Fix for [3567020edf]. check-in: c77dd425d4 user: mistachkin tags: trunk
22:37
Add tests. Closed-Leaf check-in: 99befef947 user: mistachkin tags: tkt-3567020edf
22:14
Preliminary changes to fix ticket [3567020edf]. Missing tests. check-in: bea6b5d82d user: mistachkin tags: tkt-3567020edf
Changes
Hide Diffs Unified Diffs Show Whitespace Changes Patch

Added Tests/tkt-3567020edf.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
###############################################################################
#
# tkt-3567020edf.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-3567020edf-1.1 {embedded NUL characters (UTF-8)} -setup {
  setupDb [set fileName tkt-3567020edf-1.1.db]
} -body {
  sql execute $db "CREATE TABLE t1(x);"

  sql execute $db "INSERT INTO t1 (x) VALUES(?);" \
      [list param1 String one\x00two]

  sql execute -execute reader -format list $db "SELECT x FROM t1;"
} -cleanup {
  cleanupDb $fileName

  unset -nocomplain db fileName
} -constraints \
{eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite} -result \
"one\x00two"}

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

runTest {test tkt-3567020edf-1.2 {embedded NUL characters (UTF-16)} -setup {
  setupDb [set fileName tkt-3567020edf-1.2.db] "" "" "" "" \
      UseUTF16Encoding=True
} -body {
  sql execute $db "CREATE TABLE t1(x);"

  sql execute $db "INSERT INTO t1 (x) VALUES(?);" \
      [list param1 String one\x00two]

  sql execute -execute reader -format list $db "SELECT x FROM t1;"
} -cleanup {
  cleanupDb $fileName

  unset -nocomplain db fileName
} -constraints \
{eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite} -result \
"one\x00two"}

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

runSQLiteTestEpilogue
runTestEpilogue