aboutsummaryrefslogtreecommitdiff
path: root/test/hook.test
diff options
context:
space:
mode:
Diffstat (limited to 'test/hook.test')
-rw-r--r--test/hook.test10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/hook.test b/test/hook.test
index 8638d3a6b..a4256732e 100644
--- a/test/hook.test
+++ b/test/hook.test
@@ -488,11 +488,21 @@ proc preupdate_hook {args} {
set type [lindex $args 0]
eval lappend ::preupdate $args
if {$type != "INSERT"} {
+ set x [catch {db preupdate old [db preupdate count]}]
+ if {!$x} {
+ lappend "ERROR: sqlite3_preupdate_old() accepted an out-of-bounds\
+ column index"
+ }
for {set i 0} {$i < [db preupdate count]} {incr i} {
lappend ::preupdate [db preupdate old $i]
}
}
if {$type != "DELETE"} {
+ set x [catch {db preupdate new [db preupdate count]}]
+ if {!$x} {
+ lappend "ERROR: sqlite3_preupdate_old() accepted an out-of-bounds\
+ column index"
+ }
for {set i 0} {$i < [db preupdate count]} {incr i} {
set rc [catch { db preupdate new $i } v]
lappend ::preupdate $v