Index: openacs-4/packages/acs-templating/tcl/test/util-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/tcl/test/Attic/util-procs.tcl,v diff -u -N -r1.1.2.2 -r1.1.2.3 --- openacs-4/packages/acs-templating/tcl/test/util-procs.tcl 30 Jun 2021 09:41:04 -0000 1.1.2.2 +++ openacs-4/packages/acs-templating/tcl/test/util-procs.tcl 30 Jun 2021 10:28:06 -0000 1.1.2.3 @@ -63,6 +63,32 @@ } } +aa_register_case -cats { + api + smoke + production_safe +} -procs { + template::util::get_url_directory +} get_url_directory { + Test template::util::get_url_directory + + @author Héctor Romojaro + @creation-date 30 June 2021 +} { + set url_dirs { + // // + /test / + /test/ /test/ + /test/foo/bar /test/foo/ + /test/foo/bar/ /test/foo/bar/ + } + dict for {url dir} $url_dirs { + aa_equals "Url: $url, directory: $dir" \ + [template::util::get_url_directory $url] \ + $dir + } +} + # Local variables: # mode: tcl # tcl-indent-level: 4