Index: openacs-4/packages/acs-automated-testing/tcl/filter-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-automated-testing/tcl/filter-procs.tcl,v diff -u -r1.3 -r1.3.2.1 --- openacs-4/packages/acs-automated-testing/tcl/filter-procs.tcl 7 Aug 2017 23:47:46 -0000 1.3 +++ openacs-4/packages/acs-automated-testing/tcl/filter-procs.tcl 28 Feb 2021 16:40:27 -0000 1.3.2.1 @@ -2,25 +2,21 @@ Checks whether a view_by value has a value of "testcase", "package" or "category" } { - if {$value ne "testcase" && - $value ne "package"} { - ad_complain "Invalid view_by name" - return 0 - } - return 1 + if {$value ni {testcase package}} { + ad_complain "Invalid view_by name" + return 0 + } + return 1 } ad_page_contract_filter aa_test_category { name value } { Checks whether a category value has is valid. } { - set found 0 - foreach category [nsv_get aa_test categories] { - if {$value == $category} { - return 1 + if {$value ni [nsv_get aa_test categories]} { + ad_complain "$value is not a valid acs-automated-testing testcase category" + return 0 } - } - ad_complain "$value is not a valid acs-automated-testing testcase category" - return 0 + return 1 } # Local variables: