Index: openacs-4/packages/acs-tcl/tcl/test/acs-tcl-test-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/test/acs-tcl-test-procs.tcl,v diff -u -r1.19 -r1.20 --- openacs-4/packages/acs-tcl/tcl/test/acs-tcl-test-procs.tcl 18 Dec 2003 15:44:07 -0000 1.19 +++ openacs-4/packages/acs-tcl/tcl/test/acs-tcl-test-procs.tcl 12 Jan 2004 16:00:43 -0000 1.20 @@ -691,8 +691,8 @@ aa_equals "List is not a subset" [util_get_subset_missing [list a b c d] [list a b c]] [list d] } -aa_register_case acs_tcl__all_tcl_files_parse_p { - Test all known tcl files for successful parsing "(in the [info complete] sense at least)." +aa_register_case acs_tcl__tcl_file_common_errors { + Test all known tcl files for successful parsing "(in the [info complete] sense at least)" and other common errors. @author Jeff Davis } { @@ -701,21 +701,24 @@ return [expr [string match {*.tcl} $file] || [file isdirectory $file]] } - set startdir [acs_root_dir]/packages/ + # if startdir is not [acs_root_dir]/packages, then somebody checked in the wrong thing by accident + set startdir [acs_root_dir]/packages aa_log "Checks starting from $startdir
" + #inspect every tcl file in the directory tree starting with $startdir foreach file [ad_find_all_files -check_file_func ::tcl_p $startdir] { - # Check that the file parses set fp [open $file "r"] set data [read $fp] close $fp - + + # Check that the file parses aa_true "$file parses successfully" [info complete $data] + + aa_true "$file should not contain '@returns'. @returns is probably a typo of @return" [expr [string first @returns $data] == -1] } - } aa_register_case util__randomize_list {