Index: openacs-4/packages/acs-tcl/tcl/test/acs-tcl-apm-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/test/acs-tcl-apm-procs.tcl,v diff -u -r1.10.2.2 -r1.10.2.3 --- openacs-4/packages/acs-tcl/tcl/test/acs-tcl-apm-procs.tcl 26 Jun 2019 15:31:25 -0000 1.10.2.2 +++ openacs-4/packages/acs-tcl/tcl/test/acs-tcl-apm-procs.tcl 3 Sep 2019 06:35:55 -0000 1.10.2.3 @@ -87,27 +87,23 @@ @author Hanifa Hasan } { - aa_run_with_teardown \ - -rollback \ - -test_code { - set versions [list \ - {1.2d3 3.5b -1} \ - {3.5b 1.2d3 1} \ - {3.5b 3.5b 0} \ - {5.0.0d5 5.0.0b1 -1} \ - {5.0.0a5 5.0.0b1 -1} \ - {5.0.0d5 5.0.0a1 -1} \ - ] - aa_log "-1: First version is earlier" - aa_log "0: Both versions are equal" - aa_log "1: Second version is earlier" - foreach version $versions { - set version_name1 [lindex $version 0] - set version_name2 [lindex $version 1] - set result [lindex $version 2] - aa_equals "Comparing $version_name1 and $version_name2" [apm_version_names_compare $version_name1 $version_name2] "$result" - } - } + set versions [list \ + {1.2d3 3.5b -1} \ + {3.5b 1.2d3 1} \ + {3.5b 3.5b 0} \ + {5.0.0d5 5.0.0b1 -1} \ + {5.0.0a5 5.0.0b1 -1} \ + {5.0.0d5 5.0.0a1 -1} \ + ] + aa_log "-1: First version is earlier" + aa_log "0: Both versions are equal" + aa_log "1: Second version is earlier" + foreach version $versions { + set version_name1 [lindex $version 0] + set version_name2 [lindex $version 1] + set result [lindex $version 2] + aa_equals "Comparing $version_name1 and $version_name2" [apm_version_names_compare $version_name1 $version_name2] "$result" + } } # Local variables: 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.71.2.17 -r1.71.2.18 --- openacs-4/packages/acs-tcl/tcl/test/acs-tcl-test-procs.tcl 2 Sep 2019 16:56:18 -0000 1.71.2.17 +++ openacs-4/packages/acs-tcl/tcl/test/acs-tcl-test-procs.tcl 3 Sep 2019 06:35:55 -0000 1.71.2.18 @@ -1415,16 +1415,12 @@ @author Hanifa Hasan } { - aa_run_with_teardown \ - -rollback \ - -test_code { - set cases {1 one 2 two 3 three 4 four 5 five 546356 423654 sdgvlrjnevclme sdlgtmsdgvsdf} - set cases_complete [concat $cases "Unknown"] - dict for {case result} $cases { - aa_equals "ad_decode $case $cases_complete return $result" "$result" [ad_decode $case {*}$cases_complete] - } - aa_equals "ad_decode gibberish $cases_complete return Unknown" "Unknown" [ad_decode gibberish {*}$cases_complete] - } + set cases {1 one 2 two 3 three 4 four 5 five 546356 423654 sdgvlrjnevclme sdlgtmsdgvsdf} + set cases_complete [concat $cases "Unknown"] + dict for {case result} $cases { + aa_equals "ad_decode $case $cases_complete return $result" "$result" [ad_decode $case {*}$cases_complete] + } + aa_equals "ad_decode gibberish $cases_complete return Unknown" "Unknown" [ad_decode gibberish {*}$cases_complete] } aa_register_case \ @@ -1436,16 +1432,12 @@ @author Hanifa Hasan } { - aa_run_with_teardown \ - -rollback \ - -test_code { - set convert_seconds {6344 "1h 45m 44s" 433 "7m 13s" 5556 "1h 32m 36s" 234 "3m 54s" 23 "23s" 604800 "168h 0m 0s"} - dict for {seconds result} $convert_seconds { - aa_true "util::interval_pretty $seconds return $result " {[util::interval_pretty -seconds $seconds] eq $result } - } - aa_equals "Empty seconds" [util::interval_pretty -seconds ""] "" - aa_equals "No arguments" [util::interval_pretty] "" - } + set convert_seconds {6344 "1h 45m 44s" 433 "7m 13s" 5556 "1h 32m 36s" 234 "3m 54s" 23 "23s" 604800 "168h 0m 0s"} + dict for {seconds result} $convert_seconds { + aa_true "util::interval_pretty $seconds return $result " {[util::interval_pretty -seconds $seconds] eq $result } + } + aa_equals "Empty seconds" [util::interval_pretty -seconds ""] "" + aa_equals "No arguments" [util::interval_pretty] "" } # Local variables: Index: openacs-4/packages/acs-tcl/tcl/test/widget-test-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/test/widget-test-procs.tcl,v diff -u -r1.1.2.2 -r1.1.2.3 --- openacs-4/packages/acs-tcl/tcl/test/widget-test-procs.tcl 26 Jun 2019 16:15:20 -0000 1.1.2.2 +++ openacs-4/packages/acs-tcl/tcl/test/widget-test-procs.tcl 3 Sep 2019 06:35:55 -0000 1.1.2.3 @@ -16,14 +16,10 @@ @author Hanifa Hasan } { - aa_run_with_teardown \ - -rollback \ - -test_code { - set colors { 0,0,0 #000000 255,255,255 #ffffff 218,18,26 #da121a 252,221,9 #fcdd09 99,11,87 #630b57 } - dict for { color hex } $colors { - aa_equals "ad_color_to_hex $color return $hex " "$hex" "[ad_color_to_hex $color]" - } - } + set colors { 0,0,0 #000000 255,255,255 #ffffff 218,18,26 #da121a 252,221,9 #fcdd09 99,11,87 #630b57 } + dict for { color hex } $colors { + aa_equals "ad_color_to_hex $color return $hex " "$hex" "[ad_color_to_hex $color]" + } } # Local variables: Index: openacs-4/packages/xotcl-request-monitor/tcl/test/throttle_mod-test-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xotcl-request-monitor/tcl/test/throttle_mod-test-procs.tcl,v diff -u -r1.1.2.1 -r1.1.2.2 --- openacs-4/packages/xotcl-request-monitor/tcl/test/throttle_mod-test-procs.tcl 26 Jun 2019 15:19:44 -0000 1.1.2.1 +++ openacs-4/packages/xotcl-request-monitor/tcl/test/throttle_mod-test-procs.tcl 3 Sep 2019 06:35:55 -0000 1.1.2.2 @@ -14,18 +14,14 @@ @author Hanifa Hasan } { - aa_run_with_teardown \ - -rollback \ - -test_code { - set full_string "sadlfvnsaödcösalcmksadöldcmsasdcsadvwaef4q3t54zbrefsydfsd" - aa_equals "Empty ellipsis short length" [string_truncate_middle -ellipsis "" -len 5 $full_string ] "sasd" - aa_equals "Empty ellipsis" [string_truncate_middle -ellipsis "" $full_string ] "sadlfvnsaödcösalcmksadöldcmsasdcsadvwaef4q3t54zbrefsydfsd" - aa_equals "No length" [string_truncate_middle -ellipsis ":::::::::::" $full_string ] "sadlfvnsaödcösalcmksadöldcmsasdcsadvwaef4q3t54zbrefsydfsd" - aa_equals "Short length" [string_truncate_middle -ellipsis ":::::::::::" -len 10 $full_string ] "sadlf:::::::::::ydfsd" - aa_equals "Default options" [string_truncate_middle $full_string ] "sadlfvnsaödcösalcmksadöldcmsasdcsadvwaef4q3t54zbrefsydfsd" - aa_equals "Length 0, default ellipsis" [string_truncate_middle -len 0 $full_string ] "..." - aa_equals "Length 25, default ellipsis" [string_truncate_middle -len 25 $full_string ] "sadlfvnsaödc...4zbrefsydfsd" - } + set full_string "sadlfvnsaödcösalcmksadöldcmsasdcsadvwaef4q3t54zbrefsydfsd" + aa_equals "Empty ellipsis short length" [string_truncate_middle -ellipsis "" -len 5 $full_string ] "sasd" + aa_equals "Empty ellipsis" [string_truncate_middle -ellipsis "" $full_string ] "sadlfvnsaödcösalcmksadöldcmsasdcsadvwaef4q3t54zbrefsydfsd" + aa_equals "No length" [string_truncate_middle -ellipsis ":::::::::::" $full_string ] "sadlfvnsaödcösalcmksadöldcmsasdcsadvwaef4q3t54zbrefsydfsd" + aa_equals "Short length" [string_truncate_middle -ellipsis ":::::::::::" -len 10 $full_string ] "sadlf:::::::::::ydfsd" + aa_equals "Default options" [string_truncate_middle $full_string ] "sadlfvnsaödcösalcmksadöldcmsasdcsadvwaef4q3t54zbrefsydfsd" + aa_equals "Length 0, default ellipsis" [string_truncate_middle -len 0 $full_string ] "..." + aa_equals "Length 25, default ellipsis" [string_truncate_middle -len 25 $full_string ] "sadlfvnsaödc...4zbrefsydfsd" } # Local variables: