Index: openacs-4/packages/xowiki/tcl/test/api-test-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/test/api-test-procs.tcl,v diff -u -r1.1.2.8 -r1.1.2.9 --- openacs-4/packages/xowiki/tcl/test/api-test-procs.tcl 15 Mar 2021 22:22:18 -0000 1.1.2.8 +++ openacs-4/packages/xowiki/tcl/test/api-test-procs.tcl 29 Mar 2021 08:45:31 -0000 1.1.2.9 @@ -56,7 +56,7 @@ "::xowiki::randomized_index" } \ - api_randomoized { + api_randomized { Checks randomization functions. @@ -82,6 +82,30 @@ [::tcl::mathfunc::max {*}[::xowiki::randomized_indices 5]] 4 } +aa_register_case \ + -cats {api smoke production_safe} \ + -procs { + "xowiki::filter_option_list" + } \ + api_filter_option_list { + + Checks Option list filtering. + + } { + set option_list {{label1 1} {label2 2} {label3 3}} + aa_equals "filter option_list with empty exclusion set" \ + [xowiki::filter_option_list $option_list {}] $option_list + aa_equals "filter option_list filter 2 existing values" \ + [xowiki::filter_option_list $option_list {1 3}] "{label2 2}" + + aa_equals "filter option_list filter all values" \ + [xowiki::filter_option_list $option_list {2 1 3}] "" + aa_equals "filter option_list filter non-existing value" \ + [xowiki::filter_option_list $option_list {4}] $option_list + aa_equals "filter option_list filter from empty list" \ + [xowiki::filter_option_list {} {4}] {} + } + # # Local variables: # mode: tcl