1
0
mirror of https://github.com/sqlite/sqlite.git synced 2026-10-25 09:59:22 +03:00
Files
sqlite/test/errlog01.test
drh 9336a521e8 Prototype for an sqlite3_db_log() interface.
FossilOrigin-Name: 658e20f55467a90bcebe5e01cf9f252dbe8bd690
2015-04-22 14:41:19 +00:00

38 lines
899 B
Plaintext

# 2015-04-22
#
# The author disclaims copyright to this source code. In place of
# a legal notice, here is a blessing:
#
# May you do good and not evil.
# May you find forgiveness for yourself and forgive others.
# May you share freely, never taking more than you give.
#
#*************************************************************************
# Test cases for the sqlite3_log() and sqlite3_db_log() interfaces.
#
set testdir [file dirname $argv0]
source $testdir/tester.tcl
unset -nocomplain log
set log {}
do_test errlog01-1.0 {
test_sqlite3_db_log db [list lappend ::log]
db eval {SELECT sqlite_log(7,'simulated error')}
} {{}}
do_test errlog01-1.1 {
set ::log
} {SQLITE_NOMEM {simulated error}}
do_test errlog01-1.2 {
sqlite3 db2 :memory:
set ::log {}
db2 eval {SELECT sqlite_log(7,'simulated error')}
} {{}}
do_test errlog01-1.3 {
set ::log
} {}
finish_test