Index: openacs-4/packages/acs-templating/tcl/test/date-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/tcl/test/date-procs.tcl,v diff -u -r1.4 -r1.5 --- openacs-4/packages/acs-templating/tcl/test/date-procs.tcl 8 May 2018 20:46:28 -0000 1.4 +++ openacs-4/packages/acs-templating/tcl/test/date-procs.tcl 22 Jul 2018 11:37:20 -0000 1.5 @@ -6,12 +6,16 @@ @author Dave Bauer (dave@thedesignexperience.org) @creation-date 2005-10-13 - @arch-tag: b5d458b6-bd22-4b87-8c4e-6a8c23fcca9e @cvs-id $Id$ } -aa_register_case sql_date { +aa_register_case \ + -procs { + template::util::date::get_property + template::util::date::now + } \ + sql_date { test sql date transform } { aa_run_with_teardown \ Index: openacs-4/packages/acs-templating/tcl/test/head-test-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/tcl/test/head-test-procs.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/acs-templating/tcl/test/head-test-procs.tcl 9 Mar 2018 10:22:29 -0000 1.1 +++ openacs-4/packages/acs-templating/tcl/test/head-test-procs.tcl 22 Jul 2018 11:37:20 -0000 1.2 @@ -6,7 +6,15 @@ @creation-date 2018-03-09 } -aa_register_case -cats {api smoke} head_includes { +aa_register_case \ + -cats {api} \ + -procs { + template::head::flush_link + template::head::flush_script + template::head::included_p + template::head::includes + } \ + head_includes { simple test head includes test cases } { Index: openacs-4/packages/acs-templating/tcl/test/parse-test-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/tcl/test/parse-test-procs.tcl,v diff -u -r1.9 -r1.10 --- openacs-4/packages/acs-templating/tcl/test/parse-test-procs.tcl 22 Jul 2018 09:53:51 -0000 1.9 +++ openacs-4/packages/acs-templating/tcl/test/parse-test-procs.tcl 22 Jul 2018 11:37:20 -0000 1.10 @@ -1,16 +1,18 @@ -# - ad_library { Tests for adp parsing @author Dave Bauer (dave@thedesignexperience.org) @creation-date 2005-01-01 - @arch-tag: bc76f9ce-ed1c-49dd-a3be-617d5a78c838 @cvs-id $Id$ } -aa_register_case template_variable { +aa_register_case \ + -procs { + template::adp_array_variable_regexp + template::adp_array_variable_regexp_noquote + } \ + template_variable { test adp variable parsing procedures } { aa_run_with_teardown \ @@ -57,11 +59,18 @@ @author Torben Brosten } { aa_equals "parses list of 0 items" [template::util::tcl_to_sql_list [list]] "" - aa_equals "parses list of 2 or more" [template::util::tcl_to_sql_list [list isn't hess' 'bit 'trippy']] "'isn''t', 'hess''', '''bit', '''trippy'''" + aa_equals "parses list of 2 or more" \ + [template::util::tcl_to_sql_list [list isn't hess' 'bit 'trippy']] \ + "'isn''t', 'hess''', '''bit', '''trippy'''" } -aa_register_case -cats {api smoke} expand_percentage_signs { +aa_register_case \ + -cats {api smoke} \ + -procs { + template::expand_percentage_signs + } \ + expand_percentage_signs { Test expand percentage signs to make sure it substitutes correctly @author Dave Bauer @@ -88,43 +97,21 @@ } -aa_register_case -cats {api smoke} tcl_to_sql_list { +aa_register_case \ + -cats {api smoke} \ + -procs { + template::util::tcl_to_sql_list + } \ + tcl_to_sql_list { Tests the tcl_to_sql_list proc. @author Torben Brosten } { aa_equals "parses list of 0 items" [template::util::tcl_to_sql_list [list]] "" aa_equals "parses list of 2 or more" [template::util::tcl_to_sql_list [list isn't hess' 'bit 'trippy']] "'isn''t', 'hess''', '''bit', '''trippy'''" - } -aa_register_case -cats {api smoke} expand_percentage_signs { - Test expand percentage signs to make sure it substitutes correctly - - @author Dave Bauer - @creation-date 2005-11-20 -} { - set orig_message "Test message %one%" - set one "\[__does_not_exist__\]" - set message $orig_message - aa_false "Expanded square bracket text" [catch {set expanded_message [template::expand_percentage_signs $message]} errmsg] - aa_log $errmsg - aa_equals "square brackets safe" $expanded_message "Test message \[__does_not_exist__\]" - - set one "\$__does_not_exist" - aa_false "Expanded dollar test" [catch {set expanded_message [template::expand_percentage_signs $message]} errmsg] - aa_log $errmsg - aa_equals "dollar sign safe" $expanded_message "Test message \$__does_not_exist" - - set one "\$two(\$three(\[__does_not_exist\]))" - - aa_false "Square bracket in array key test" [catch {set expanded_message [template::expand_percentage_signs $message]} errmsg] - aa_log $errmsg - aa_equals "square brackets in array key safe" $expanded_message "Test message \$two(\$three(\[__does_not_exist\]))" - -} - # Local variables: # mode: tcl # tcl-indent-level: 4 Index: openacs-4/packages/acs-templating/tcl/test/spell-checker-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/tcl/test/spell-checker-procs.tcl,v diff -u -r1.12 -r1.13 --- openacs-4/packages/acs-templating/tcl/test/spell-checker-procs.tcl 19 Jul 2018 12:16:20 -0000 1.12 +++ openacs-4/packages/acs-templating/tcl/test/spell-checker-procs.tcl 22 Jul 2018 11:37:20 -0000 1.13 @@ -6,7 +6,13 @@ @cvs-id $Id$ } -aa_register_case -cats { api } spellcheck__get_element_formtext { +aa_register_case \ + -cats { api } \ + -procs { + parameter::get_from_package_key + template::util::spellcheck::get_element_formtext + } \ + spellcheck__get_element_formtext { Test the spell-check proc that does the actual spell-checking. } { @@ -50,15 +56,12 @@ aa_log "Have you installed aspell and aspell-dict-en ?" return } - aa_true "True statement: Text contains no misspelled words" {$error_num == 0} aa_log "Number of miss-spelled words found in text: $error_num" - aa_false "False statement: Text contains misspelled word(s)" {$error_num > 0} aa_equals "Number of misspelled words found in text" $error_num 0 - aa_log "Returned string: $formtext_to_display" aa_true "The returned string contains a hidden var named 'var_to_spellcheck.merge_text'" \ @@ -89,20 +92,21 @@ aa_true "True statement: Text contains misspelled words" {$error_num > 0} aa_log "Number of misspelled words found in text: $error_num" - aa_false "False statement: Text contains no misspelled word(s)" {$error_num == 0} aa_log "Returned string: $formtext_to_display" - aa_true "The returned string contains a hidden var named 'var_to_spellcheck.merge_text'" \ [regexp "var_to_spellcheck.merge_text" $formtext_to_display] aa_true "The returned string contains $error_num hidden var(s) named 'var_to_spellcheck.error_N', where N is a number between 0 and [expr {$error_num - 1}]." \ [regexp "var_to_spellcheck.error_\[0-9\]*" $formtext_to_display] - aa_equals "The number of misspelled words matches the number of error placeholders in the merge_text" [regexp -all "var_to_spellcheck.error_\[0-9\]*" $formtext_to_display] [regexp -all "\#\[0-9\]*\#" $formtext_to_display] + aa_equals "The number of misspelled words matches the number of error placeholders in the merge_text" \ + [regexp -all "var_to_spellcheck.error_\[0-9\]*" $formtext_to_display] \ + [regexp -all "\#\[0-9\]*\#" $formtext_to_display] - aa_true "just_the_errwords contains the errwords we expected: '[join $errwords ", "]'" [util_sets_equal_p $just_the_errwords $errwords] + aa_true "just_the_errwords contains the errwords we expected: '[join $errwords ", "]'" \ + [util_sets_equal_p $just_the_errwords $errwords] ##### # @@ -125,13 +129,11 @@ aa_true "True statement: HTML fragment contains no misspelled words" {$error_num == 0} aa_log "Number of miss-spelled words found in HTML fragment: $error_num" - aa_false "False statement: HTML fragment contains misspelled word(s)" {$error_num > 0} aa_equals "Number of misspelled words found in HTML fragment" $error_num 0 aa_log "Returned string: $formtext_to_display" - aa_true "The returned string contains a hidden var named 'var_to_spellcheck.merge_text'" \ [regexp "var_to_spellcheck.merge_text" $formtext_to_display] @@ -172,12 +174,19 @@ aa_true "The returned string contains hidden var(s) named 'var_to_spellcheck.error_N', where N is the error number." \ [regexp "var_to_spellcheck.error_\[0-9\]*" $formtext_to_display] - aa_true "just_the_errwords contains the errwords we expected: '[join $errwords ", "]'" [util_sets_equal_p $just_the_errwords $errwords] + aa_true "just_the_errwords contains the errwords we expected: '[join $errwords ", "]'" \ + [util_sets_equal_p $just_the_errwords $errwords] } -aa_register_case -cats { api } spellcheck__spellcheck_properties { +aa_register_case \ + -cats { api } \ + -procs { + parameter::get_from_package_key + template::util::spellcheck::spellcheck_properties + } \ + spellcheck__spellcheck_properties { Test the proc that knows if spell-checking is activated, if it should be performed, and which value the pull-down menu should default to. } { @@ -210,8 +219,10 @@ # textarea set element(widget) textarea # spellcheck conf from parameter - set spellcheck_p [expr {[info exists widget_info($element(widget))] && - [set widget_info($element(widget))]}] + set spellcheck_p [expr { + [info exists widget_info($element(widget))] + && $widget_info($element(widget)) + }] aa_log "--- Spell-checking enabled on widget \"$element(widget)\"? --- $command" array set spellcheck [{*}$command] @@ -226,8 +237,10 @@ # richtext set element(widget) richtext # spellcheck conf from parameter - set spellcheck_p [expr {[info exists widget_info($element(widget))] && - [set widget_info($element(widget))]}] + set spellcheck_p [expr { + [info exists widget_info($element(widget))] + && $widget_info($element(widget)) + }] aa_log "--- Spell-checking enabled on widget \"$element(widget)\"? --- $command" array set spellcheck [{*}$command] Index: openacs-4/packages/calendar/tcl/test/cal-item-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/tcl/test/cal-item-procs.tcl,v diff -u -r1.7 -r1.8 --- openacs-4/packages/calendar/tcl/test/cal-item-procs.tcl 22 Jul 2018 10:08:01 -0000 1.7 +++ openacs-4/packages/calendar/tcl/test/cal-item-procs.tcl 22 Jul 2018 11:43:08 -0000 1.8 @@ -3,7 +3,16 @@ Tests for calendar::item API } -aa_register_case -cats api cal_item_edit_recurrence { +aa_register_case \ + -cats api \ + -procs { + calendar::create + calendar::item::add_recurrence + calendar::item::edit + calendar::item::get + calendar::item::new + } \ + cal_item_edit_recurrence { Test editing a recurring calendar item/event } { aa_run_with_teardown \ @@ -135,13 +144,21 @@ set passed [expr {$passed && $ci_description eq $cal_item(description)}] } aa_true "Edited item name and New individual names are updated" $passed - - } } -aa_register_case -cats api cal_item_add_delete { +aa_register_case \ + -cats {api} \ + -procs { + calendar::create + calendar::delete + calendar::item::add_recurrence + calendar::item::delete + calendar::item::get + calendar::item::new + } \ + cal_item_add_delete { Test adding and deleting a calendar entry } { try { Index: openacs-4/packages/categories/tcl/test/categories-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/categories/tcl/test/categories-procs.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/categories/tcl/test/categories-procs.tcl 7 Aug 2017 23:48:05 -0000 1.2 +++ openacs-4/packages/categories/tcl/test/categories-procs.tcl 22 Jul 2018 11:47:03 -0000 1.3 @@ -6,7 +6,9 @@ @cvs-id $Id$ } -aa_register_case category_tree_add { +aa_register_case \ + -procs {category_tree::add} \ + category_tree_add { Test the category_tree::add proc. } { @@ -25,7 +27,12 @@ } } -aa_register_case category_add { +aa_register_case \ + -procs { + category_tree::add + category::add + } \ + category_add { Test the category::add proc. } { @@ -50,7 +57,13 @@ } } -aa_register_case category_delete { +aa_register_case \ + -procs { + category::add + category::delete + category_tree::add + } \ + category_delete { Test the category::delete proc. } {