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

Fix a problem handling a malloc() failure in printf.c. Also some other things to improve test coverage. (CVS 4361)

FossilOrigin-Name: 595bfe72f053bc6ecb58bb9044a4cdc53d30b404
This commit is contained in:
danielk1977
2007-09-01 09:02:53 +00:00
parent 95c8a54c7d
commit ca0c89715e
10 changed files with 259 additions and 175 deletions

View File

@ -11,7 +11,7 @@
# This file implements regression tests for SQLite library. The
# focus of this file is exercising the code in main.c.
#
# $Id: main.test,v 1.25 2006/02/09 22:24:41 drh Exp $
# $Id: main.test,v 1.26 2007/09/01 09:02:54 danielk1977 Exp $
set testdir [file dirname $argv0]
source $testdir/tester.tcl
@ -315,5 +315,42 @@ do_test main-3.6 {
catchsql {SELECT 'abc' + #9}
} {1 {near "#9": syntax error}}
# The following test-case tests the linked list code used to manage
# sqlite3_vfs structures.
do_test main-4.1 {
sqlite3_crash_enable 1
sqlite3_crash_enable 0
sqlite3async_enable 1
sqlite3async_enable 0
sqlite3_crash_enable 1
sqlite3async_enable 1
sqlite3_crash_enable 0
sqlite3async_enable 0
sqlite3_crash_enable 1
sqlite3async_enable 1
sqlite3async_enable 0
sqlite3_crash_enable 0
sqlite3async_enable 1
sqlite3_crash_enable 1
sqlite3_crash_enable 0
sqlite3async_enable 0
sqlite3async_enable 1
sqlite3_crash_enable 1
sqlite3async_enable 0
sqlite3_crash_enable 0
} {}
do_test main-4.2 {
set rc [catch {sqlite3 db test.db -vfs crash} msg]
list $rc $msg
} {1 {no such vfs: crash}}
do_test main-4.3 {
set rc [catch {sqlite3 db test.db -vfs async} msg]
list $rc $msg
} {1 {no such vfs: async}}
finish_test