diff options
Diffstat (limited to 'test/mallocG.test')
-rw-r--r-- | test/mallocG.test | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/test/mallocG.test b/test/mallocG.test index c2fa79ab6..aa93aced0 100644 --- a/test/mallocG.test +++ b/test/mallocG.test @@ -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 |