Index: openacs-4/packages/acs-tcl/tcl/test/db-proc-test-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/test/db-proc-test-procs.tcl,v diff -u -r1.1.2.13 -r1.1.2.14 --- openacs-4/packages/acs-tcl/tcl/test/db-proc-test-procs.tcl 27 Feb 2021 22:12:47 -0000 1.1.2.13 +++ openacs-4/packages/acs-tcl/tcl/test/db-proc-test-procs.tcl 28 Feb 2021 21:27:19 -0000 1.1.2.14 @@ -625,7 +625,7 @@ This tests db_string with various arguments. - } { + } { set r [db_string x {select object_id from acs_objects where object_id = -1}] aa_true "constant query" {$r == -1} @@ -644,6 +644,38 @@ aa_true "failing query with default" {$r == -1} } +aa_register_case \ + -cats {api db smoke} \ + -error_level "error" \ + -procs { + db_list + db_list_of_lists + + db_list_of_ns_sets + } \ + db__list_variants { + + This tests db_list with various arguments. + + } { + foreach cmd {db_list db_list_of_lists} { + set r [$cmd x {select object_id from acs_objects where object_id = -1}] + aa_true "$cmd constant query" {$r == -1} + + set x -1 + set r [$cmd x {select object_id from acs_objects where object_id = :x}] + aa_true "$cmd query with bind variable from environment" {$r == -1} + + set r [$cmd x {select object_id from acs_objects where object_id = :a} -bind {a -1}] + aa_true "$cmd query with provided bind variable from var list" {$r == -1} + + set s [ns_set create binds b -1] + set r [$cmd x {select object_id from acs_objects where object_id = :b} -bind $s] + aa_true "$cmd query with provided bind variable from ns_set" {$r == -1} + } + + } + # Local variables: # mode: tcl # tcl-indent-level: 4