SQLite

Check-in [6c51bad0a3]
Login

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

Overview
Comment:Adjust a couple of test scripts so that they work with OMIT_UTF16 builds.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 6c51bad0a306558d2725463b5675c3799fabcb9d
User & Date: dan 2011-07-04 06:52:15.309
Context
2011-07-06
09:36
Expose the value of compile time symbol SQLITE_MAX_DEFAULT_PAGE_SIZE to test scripts. (check-in: 335736637c user: dan tags: trunk)
2011-07-04
06:52
Adjust a couple of test scripts so that they work with OMIT_UTF16 builds. (check-in: 6c51bad0a3 user: dan tags: trunk)
2011-07-02
19:12
Add a testcase macro to ensure testing a boundary case in DISTINCT processing. (check-in: ff9fc722dc user: drh tags: trunk)
Changes
Side-by-Side Diff Ignore Whitespace Patch
Changes to test/func3.test.
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
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







+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+







# with functions created using sqlite3_create_function_v2() is 
# correctly invoked.
#
set testdir [file dirname $argv0]
source $testdir/tester.tcl


ifcapable utf16 {
do_test func3-1.1 {
  set destroyed 0
  proc destroy {} { set ::destroyed 1 }
  sqlite3_create_function_v2 db f2 -1 any -func f2 -destroy destroy
  set destroyed
} 0
do_test func3-1.2 {
  sqlite3_create_function_v2 db f2 -1 utf8 -func f2
  set destroyed
} 0
do_test func3-1.3 {
  sqlite3_create_function_v2 db f2 -1 utf16le -func f2
  set destroyed
} 0
do_test func3-1.4 {
  sqlite3_create_function_v2 db f2 -1 utf16be -func f2
  set destroyed
} 1
  do_test func3-1.1 {
    set destroyed 0
    proc destroy {} { set ::destroyed 1 }
    sqlite3_create_function_v2 db f2 -1 any -func f2 -destroy destroy
    set destroyed
  } 0
  do_test func3-1.2 {
    sqlite3_create_function_v2 db f2 -1 utf8 -func f2
    set destroyed
  } 0
  do_test func3-1.3 {
    sqlite3_create_function_v2 db f2 -1 utf16le -func f2
    set destroyed
  } 0
  do_test func3-1.4 {
    sqlite3_create_function_v2 db f2 -1 utf16be -func f2
    set destroyed
  } 1
}

do_test func3-2.1 {
  set destroyed 0
  proc destroy {} { set ::destroyed 1 }
  sqlite3_create_function_v2 db f3 -1 utf8 -func f3 -destroy destroy
  set destroyed
} 0
Changes to test/sqllimits1.test.
315
316
317
318
319
320
321

322
323
324
325





326
327
328
329

330
331
332
333





334
335
336
337
338
339
340
315
316
317
318
319
320
321
322




323
324
325
326
327
328
329
330
331
332




333
334
335
336
337
338
339
340
341
342
343
344







+
-
-
-
-
+
+
+
+
+




+
-
-
-
-
+
+
+
+
+







} {SQLITE_TOOBIG}
do_test sqllimits1-5.14.4 {
  set np1 [expr {$SQLITE_LIMIT_LENGTH + 1}]
  set ::str1 [string repeat A $np1]
  catch {sqlite3_bind_text $::STMT 1 $::str1 -1} res
  set res
} {SQLITE_TOOBIG}
ifcapable utf16 {
do_test sqllimits1-5.14.5 {
  catch {sqlite3_bind_text16 $::STMT 1 $::str1 -1} res
  set res
} {SQLITE_TOOBIG}
  do_test sqllimits1-5.14.5 {
    catch {sqlite3_bind_text16 $::STMT 1 $::str1 -1} res
    set res
  } {SQLITE_TOOBIG}
}
do_test sqllimits1-5.14.6 {
  catch {sqlite3_bind_text $::STMT 1 $::str1 $np1} res
  set res
} {SQLITE_TOOBIG}
ifcapable utf16 {
do_test sqllimits1-5.14.7 {
  catch {sqlite3_bind_text16 $::STMT 1 $::str1 $np1} res
  set res
} {SQLITE_TOOBIG}
  do_test sqllimits1-5.14.7 {
    catch {sqlite3_bind_text16 $::STMT 1 $::str1 $np1} res
    set res
  } {SQLITE_TOOBIG}
}
do_test sqllimits1-5.14.8 {
  set n [expr {$np1-1}]
  catch {sqlite3_bind_text $::STMT 1 $::str1 $n} res
  set res
} {}
do_test sqllimits1-5.14.9 {
  catch {sqlite3_bind_text16 $::STMT 1 $::str1 $n} res