1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-30 19:03:16 +03:00

Pager tests working. (CVS 1308)

FossilOrigin-Name: 910067a200c4b25b5d813a84146673d3d1c80952
This commit is contained in:
drh
2004-04-26 14:10:20 +00:00
parent 9e572e608f
commit 3aac2dd7bc
14 changed files with 870 additions and 849 deletions

View File

@ -11,7 +11,7 @@
# This file implements regression tests for SQLite library. The
# focus of this script is page cache subsystem.
#
# $Id: pager.test,v 1.14 2004/02/25 02:20:42 drh Exp $
# $Id: pager.test,v 1.15 2004/04/26 14:10:22 drh Exp $
set testdir [file dirname $argv0]
@ -305,7 +305,7 @@ for {set i 1} {$i<20} {incr i} {
page_write $gx "Page-$j v$i"
page_unref $gx
if {$j==$i} {
pager_ckpt_begin $p1
pager_stmt_begin $p1
}
}
} {}
@ -346,12 +346,12 @@ for {set i 1} {$i<20} {incr i} {
page_write $gx "Page-$j v$i"
page_unref $gx
if {$j==$i} {
pager_ckpt_begin $p1
pager_stmt_begin $p1
}
}
} {}
do_test pager-4.5.$i.7 {
pager_ckpt_rollback $p1
pager_stmt_rollback $p1
for {set j 2} {$j<=20} {incr j} {
set gx [page_get $p1 $j]
set value [page_read $gx]
@ -373,12 +373,12 @@ for {set i 1} {$i<20} {incr i} {
page_write $gx "Page-$j v$i"
page_unref $gx
if {$j==$i} {
pager_ckpt_begin $p1
pager_stmt_begin $p1
}
}
} {}
do_test pager-4.5.$i.9 {
pager_ckpt_commit $p1
pager_stmt_commit $p1
for {set j 2} {$j<=20} {incr j} {
set gx [page_get $p1 $j]
set value [page_read $gx]
@ -406,6 +406,7 @@ do_test pager-4.99 {
} ;# end if( not mem: and has pager_open command );
if 0 {
# Ticket #615: an assertion fault inside the pager. It is a benign
# fault, but we might as well test for it.
#
@ -418,6 +419,6 @@ do_test pager-5.1 {
COMMIT;
}
} {}
}
finish_test

View File

@ -11,8 +11,9 @@
# This file implements some common TCL routines used for regression
# testing the SQLite library
#
# $Id: tester.tcl,v 1.28 2004/02/14 01:39:50 drh Exp $
# $Id: tester.tcl,v 1.29 2004/04/26 14:10:22 drh Exp $
if 0 {
# Make sure tclsqlite was compiled correctly. Abort now with an
# error message if not.
#
@ -62,6 +63,8 @@ sqlite db ./test.db
if {[info exists ::SETUP_SQL]} {
db eval $::SETUP_SQL
}
}
proc db {args} {}
# Abort early if this script has been run before.
#
@ -180,10 +183,12 @@ proc finalize_testing {} {
puts "$nProb probabilistic tests also failed, but this does"
puts "not necessarily indicate a malfunction."
}
if 0 {
if {$sqlite_open_file_count} {
puts "$sqlite_open_file_count files were left open"
incr nErr
}
}
exit [expr {$nErr>0}]
}