/ Check-in [9cf371d8]
Login
SQLite training in Houston TX on 2019-11-05 (details)
Part of the 2019 Tcl Conference

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

Overview
Comment:Fix capi3.test so that it works with production (as well as debugging ) builds. (CVS 1766)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 9cf371d85d99235771f173572265c5e4dd5ab273
User & Date: danielk1977 2004-06-29 14:03:58
Context
2004-06-29
23:52
Run tests in UTF-16 mode. (CVS 1767) check-in: 822bee3a user: danielk1977 tags: trunk
14:03
Fix capi3.test so that it works with production (as well as debugging ) builds. (CVS 1766) check-in: 9cf371d8 user: danielk1977 tags: trunk
13:54
Fix TRACE7 in os_common.h. (CVS 1765) check-in: 76e0b749 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to test/capi3.test.

7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
...
571
572
573
574
575
576
577

578
579
580
581
582
583
584
...
587
588
589
590
591
592
593

594
595
596
597
598
#    May you find forgiveness for yourself and forgive others.
#    May you share freely, never taking more than you give.
#
#***********************************************************************
# This file implements regression tests for SQLite library.  The
# focus of this script testing the callback-free C/C++ API.
#
# $Id: capi3.test,v 1.16 2004/06/29 13:18:24 danielk1977 Exp $
#

set testdir [file dirname $argv0]
source $testdir/tester.tcl

# Return the UTF-16 representation of the supplied UTF-8 string $str.
# If $nt is true, append two 0x00 bytes as a nul terminator.
................................................................................
set test_number 1
foreach {code english} $code2english {
  do_test capi3-9.$test_number "sqlite3_test_errstr $code" $english
  incr test_number
}

# Test the error message when a "real" out of memory occurs.

set sqlite_malloc_fail 1
do_test capi3-10-1 {
  set ::DB [sqlite3 db test.db]
  sqlite_malloc_fail 1
  catchsql {
    select * from sqlite_master;
  }
................................................................................
  sqlite3_errmsg $::DB
} {out of memory}
do_test capi3-10-3 {
  utf8 [sqlite3_errmsg16 $::DB]
} {out of memory}
db close
sqlite_malloc_fail 0


finish_test










|







 







>







 







>





7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
...
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
...
588
589
590
591
592
593
594
595
596
597
598
599
600
#    May you find forgiveness for yourself and forgive others.
#    May you share freely, never taking more than you give.
#
#***********************************************************************
# This file implements regression tests for SQLite library.  The
# focus of this script testing the callback-free C/C++ API.
#
# $Id: capi3.test,v 1.17 2004/06/29 14:03:58 danielk1977 Exp $
#

set testdir [file dirname $argv0]
source $testdir/tester.tcl

# Return the UTF-16 representation of the supplied UTF-8 string $str.
# If $nt is true, append two 0x00 bytes as a nul terminator.
................................................................................
set test_number 1
foreach {code english} $code2english {
  do_test capi3-9.$test_number "sqlite3_test_errstr $code" $english
  incr test_number
}

# Test the error message when a "real" out of memory occurs.
if {[info command sqlite_malloc_stat]!=""} {
set sqlite_malloc_fail 1
do_test capi3-10-1 {
  set ::DB [sqlite3 db test.db]
  sqlite_malloc_fail 1
  catchsql {
    select * from sqlite_master;
  }
................................................................................
  sqlite3_errmsg $::DB
} {out of memory}
do_test capi3-10-3 {
  utf8 [sqlite3_errmsg16 $::DB]
} {out of memory}
db close
sqlite_malloc_fail 0
}

finish_test