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.23 -r1.1.2.24 --- openacs-4/packages/acs-tcl/tcl/test/db-proc-test-procs.tcl 20 Jul 2022 11:46:48 -0000 1.1.2.23 +++ openacs-4/packages/acs-tcl/tcl/test/db-proc-test-procs.tcl 27 Jul 2022 13:54:20 -0000 1.1.2.24 @@ -106,6 +106,20 @@ aa_equals "db_foreach executes the 'no row' code block using the 'if_no_rows' syntax" \ "not found" \ $results + + # 3 columns + set results "" + db_foreach query {select * from (values ('a1','b1','c1')) as X(a,b,c)} -column_array things { + set results [lsort [array get things]] + } + aa_equals "db_foreach with three columns" "{a a1} {b b1} {c c1}" $results + + # 4 columns + set results "" + db_foreach query {select * from (values ('a1','b1','c1','d1')) as X(a,b,c,d)} -column_array things { + set results [lsort [array get things]] + } + aa_equals "db_foreach with four columns" "{a a1} {b b1} {c c1} {d d1}" $results } aa_register_case \