Index: openacs-4/packages/acs-templating/tcl/test/data-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/tcl/test/Attic/data-procs.tcl,v diff -u -N -r1.1.2.4 -r1.1.2.5 --- openacs-4/packages/acs-templating/tcl/test/data-procs.tcl 28 Jun 2021 09:44:24 -0000 1.1.2.4 +++ openacs-4/packages/acs-templating/tcl/test/data-procs.tcl 28 Jun 2021 09:51:59 -0000 1.1.2.5 @@ -138,6 +138,30 @@ } } +aa_register_case -cats { + api + smoke + production_safe +} -procs { + template::data::validate + template::data::validate::float +} validate_float { + Test validation for float data types + + @author Héctor Romojaro + @creation-date 28 June 2021 +} { + set float_true {0 1 -9 0.0 5.3 +0.1 .3 -9.3 34433333333333333333333333333333333333.4566666666666} + set float_false {lala -1,0 ,3 - .} + set message "" + foreach value $float_true { + aa_true "Is $value a float?" [template::data::validate float value message] + } + foreach value $float_false { + aa_false "Is $value a float?" [template::data::validate float value message] + } +} + # Local variables: # mode: tcl # tcl-indent-level: 4