1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-29 08:01:23 +03:00

Make check-in (5356) compatible with builds that do not enable memory

management.  Remove unnecessary code from main.c.  Add out-of-memory
tests for sqlite3_complete16(). (CVS 5357)

FossilOrigin-Name: 28f8b6bfcc3e169f8a54a6681395f2c85bf99cab
This commit is contained in:
drh
2008-07-07 19:52:09 +00:00
parent da8c8f2f8f
commit bd0b1b50f4
6 changed files with 47 additions and 32 deletions

View File

@ -11,7 +11,7 @@
#
# This test script checks malloc failures in various obscure operations.
#
# $Id: mallocG.test,v 1.3 2008/02/18 22:24:58 drh Exp $
# $Id: mallocG.test,v 1.4 2008/07/07 19:52:11 drh Exp $
set testdir [file dirname $argv0]
source $testdir/tester.tcl
@ -53,4 +53,16 @@ do_malloc_test mallocG-3 -sqlprep {
AND x BETWEEN 'i' AND 'm'
}
proc utf16 {utf8} {
set utf16 [encoding convertto unicode $utf8]
append utf16 "\x00\x00"
return $utf16
}
do_malloc_test mallocG-4 -tclbody {
set rc [sqlite3_complete16 [utf16 "SELECT * FROM t1;"]]
if {$rc==1} {set rc 0} {error "out of memory"}
set rc
}
finish_test