Index: openacs-4/packages/acs-templating/tcl/test/data-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/tcl/test/data-procs.tcl,v diff -u -r1.1.2.8 -r1.1.2.9 --- openacs-4/packages/acs-templating/tcl/test/data-procs.tcl 28 Jun 2021 10:15:21 -0000 1.1.2.8 +++ openacs-4/packages/acs-templating/tcl/test/data-procs.tcl 28 Jun 2021 10:16:31 -0000 1.1.2.9 @@ -232,6 +232,30 @@ } } +aa_register_case -cats { + api + smoke + production_safe +} -procs { + template::data::validate + template::data::validate::keyword +} validate_keyword { + Test validation for keyword data types + + @author Héctor Romojaro + @creation-date 28 June 2021 +} { + set keyword_true {0 1 lala lala_la_la} + set keyword_false {-1,0 -ojaio ,3 - . "la la la"} + set message "" + foreach value $keyword_true { + aa_true "Is $value a keyword?" [template::data::validate keyword value message] + } + foreach value $keyword_false { + aa_false "Is $value a keyword?" [template::data::validate keyword value message] + } +} + # Local variables: # mode: tcl # tcl-indent-level: 4