Index: openacs-4/packages/acs-tcl/tcl/test/doc-check-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/test/doc-check-procs.tcl,v diff -u -N -r1.7 -r1.8 --- openacs-4/packages/acs-tcl/tcl/test/doc-check-procs.tcl 23 Jul 2018 22:05:54 -0000 1.7 +++ openacs-4/packages/acs-tcl/tcl/test/doc-check-procs.tcl 23 Jul 2018 22:27:48 -0000 1.8 @@ -81,10 +81,10 @@ set typo_list "[acs_package_root_dir "acs-tcl"]/tcl/test/doc-check-procs-common-typos.txt" set typos [dict create] - # Create the typos dictionary with values from the common typos file + # Create the typo dictionary with values from the common typos file set f [open $typo_list] while {[gets $f line] >= 0} { - dict append typos {*}$line + dict append typos {*}[string tolower $line] } close $f @@ -94,20 +94,22 @@ foreach p [lsort -dictionary [nsv_array names api_proc_doc]] { incr count set typo_number 0 - set proc_doc [dict create {*}[nsv_get api_proc_doc $p]] + set proc_doc [dict create {*}[string tolower [nsv_get api_proc_doc $p]]] + set main_doc [dict get $proc_doc main] # - # Remove extra characters from the doc and transform to lowercase. + # Remove extra characters from the doc. # # string map is quick, but feel free to replace it with a quicker and/or # cleaner method. # - set proc_doc_clean [string tolower \ - [concat {*}[string map {& " " \" " " < " " > " " \[ " " \] " " , "" \{ "" \} ""} \ - [dict get $proc_doc main]]]] + set proc_doc_clean [concat \ + {*}[string map {& " " \" " " < " " > " " \[ " " \] " " , "" \{ "" \} ""} \ + $main_doc]] if { $proc_doc_clean ne "" } { foreach typo [dict keys $typos] { #ns_log Notice "Typo check in $p: Typo: $typo Doc: $proc_doc_clean" - if { [string tolower $typo] in $proc_doc_clean } { + if { "$typo" in $proc_doc_clean } { + # Typo found! incr typo_number aa_log_result fail "$p spelling error: $typo -> [dict get $typos $typo]" }