Index: openacs-4/packages/xowiki/tcl/test/check-method-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/test/check-method-procs.tcl,v diff -u -r1.1.2.1 -r1.1.2.2 --- openacs-4/packages/xowiki/tcl/test/check-method-procs.tcl 7 Apr 2019 19:34:18 -0000 1.1.2.1 +++ openacs-4/packages/xowiki/tcl/test/check-method-procs.tcl 17 Jun 2020 19:04:03 -0000 1.1.2.2 @@ -1,3 +1,4 @@ + aa_register_case -cats {smoke production_safe} web_callable_methods_naming { checks naming conventions of web callable methods @@ -8,13 +9,11 @@ [::xowiki::Page info subclass -closure] \ [::xowiki::Package info subclass -closure] \ ] { - foreach m [lsort [$cl info instprocs]] { - if {[string match "www-*" $m]} { - incr count - regexp {www[-](.*)$} $m . suffix - set wrong [regexp {[^a-z0-9-]} $suffix] - aa_false "web callable method '$cl instproc $m' does not follow naming guidelines (just lower case, digit and dash)" $wrong - } + foreach m [lsort [$cl info instprocs www-*]] { + incr count + regexp {www[-](.*)$} $m . suffix + set wrong [regexp {[^a-z0-9-]} $suffix] + aa_false "web callable method '$cl instproc $m' does not follow naming guidelines (just lower case, digit and dash)" $wrong } } aa_log "Checked $count web callable methods" @@ -33,12 +32,10 @@ [::xowiki::Page info subclass -closure] \ [::xowiki::Package info subclass -closure] \ ] { - foreach m [lsort [$cl info instprocs]] { - if {[string match "www-*" $m]} { - incr count - set exists [nsv_exists api_proc_doc "$cl instproc $m"] - aa_true "documentation for web callable method '$cl instproc $m'" $exists - } + foreach m [lsort [$cl info instprocs www-*]] { + incr count + set exists [nsv_exists api_proc_doc "[string trimleft $cl :] instproc $m"] + aa_true "documentation for web callable method '$cl instproc $m'" $exists } } aa_log "Checked $count web callable methods"