Index: openacs-4/packages/acs-lang/tcl/test/acs-lang-test-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-lang/tcl/test/acs-lang-test-procs.tcl,v
diff -u -r1.12 -r1.13
--- openacs-4/packages/acs-lang/tcl/test/acs-lang-test-procs.tcl 11 Dec 2003 21:39:53 -0000 1.12
+++ openacs-4/packages/acs-lang/tcl/test/acs-lang-test-procs.tcl 15 Feb 2004 11:11:39 -0000 1.13
@@ -464,10 +464,14 @@
}
}
-aa_register_case util__replace_temporary_tags_with_lookups {
- Primarily tests lang::util::replace_temporary_tags_with_lookups,
- Also tests the procs lang::catalog::export_messages_to_file, lang::catalog::parse,
- lang::catalog::read_file, and lang::util::get_temporary_tags_indices.
+aa_register_case \
+ -procs {
+ lang::util::replace_temporary_tags_with_lookups
+ lang::catalog::export_messages_to_file
+ lang::catalog::parse
+ lang::catalog::read_file
+ lang::util::get_temporary_tags_indices
+ } util__replace_temporary_tags_with_lookups {
A test tcl file and catalog file are created. The temporary tags in the
tcl file are replaced with message lookups and keys and messages are appended
@@ -565,8 +569,10 @@
file delete "[acs_root_dir]/$tcl_backup_file"
}
-aa_register_case util__get_hash_indices {
- Tests the lang::util::get_hash_indices proc
+aa_register_case \
+ -procs {
+ lang::util::get_hash_indices
+ } util__get_hash_indices {
@author Peter Marklund (peter@collaboraid.biz)
@creation-date 21 October 2002
@@ -589,8 +595,10 @@
}
}
-aa_register_case util__convert_adp_variables_to_percentage_signs {
- Tests the lang::util::convert_adp_variables_to_percentage_signs proc.
+aa_register_case \
+ -procs {
+ lang::util::convert_adp_variables_to_percentage_signs
+ } util__convert_adp_variables_to_percentage_signs {
@author Peter Marklund (peter@collaboraid.biz)
@creation-date 25 October 2002
@@ -611,8 +619,10 @@
$adp_chunk_expected]
}
-aa_register_case util__replace_adp_text_with_message_tags {
- Test the lang::util::replace_adp_text_with_message_tags proc.
+aa_register_case \
+ -procs {
+ lang::util::replace_adp_text_with_message_tags
+ } util__replace_adp_text_with_message_tags {
@author Peter Marklund (peter@collaboraid.biz)
@creation-date 28 October 2002
@@ -649,8 +659,10 @@
file delete $adp_file_path
}
-aa_register_case message__format {
- Tests the lang::message::format proc
+aa_register_case \
+ -procs {
+ lang::message::format
+ } message__format {
@author Peter Marklund (peter@collaboraid.biz)
@creation-date 21 October 2002
@@ -666,8 +678,10 @@
$expected_message]
}
-aa_register_case message__get_embedded_vars {
- Tests the lang::message::get_embedded_vars proc
+aa_register_case \
+ -procs {
+ lang::message::get_embedded_vars
+ } message__get_embedded_vars {
@author Peter Marklund (peter@collaboraid.biz)
@creation-date 12 November 2002
@@ -706,7 +720,12 @@
}
}
-aa_register_case locale__test_system_package_setting {
+aa_register_case \
+ -procs {
+ lang::system::set_locale
+ lang::system::locale
+ lang::system::site_wide_locale
+ } locale__test_system_package_setting {
Tests whether the system package level setting works
@author Lars Pind (lars@collaboraid.biz)
@@ -745,8 +764,10 @@
aa_true "Retrieved system locale ('$retrieved_locale') equals the one we just set ('$locale_to_set')" [string equal $locale_to_set $retrieved_locale]
}
-aa_register_case locale__test_lang_conn_browser_locale {
- Tests the proc lang::conn::browser_locale
+aa_register_case \
+ -procs {
+ lang::conn::browser_locale
+ } locale__test_lang_conn_browser_locale {
@author Peter Marklund
@creation-date 2003-08-13
@@ -781,7 +802,9 @@
}
-aa_register_case strange_oracle_problem {
+aa_register_case \
+ -cats db \
+ strange_oracle_problem {
Strange Oracle problem when selecting by language
} {
@@ -798,7 +821,13 @@
}
-aa_register_case set_get_timezone {
+aa_register_case \
+ -procs {
+ lang::user::set_timezone
+ lang::system::set_timezone
+ lang::system::timezone
+ } set_get_timezone {
+
Test that setting and getting user timezone works
} {
# We cannot test timezones if they are not installed
@@ -868,7 +897,11 @@
}
}
-aa_register_case set_timezone_not_logged_in {
+aa_register_case \
+ -procs {
+ lang::user::set_timezone
+ lang::system::timezone
+ } set_timezone_not_logged_in {
Test that setting and getting user timezone throws an error when user is not logged in
} {
# We cannot test timezones if they are not installed
@@ -893,7 +926,10 @@
aa_equals "%Z returns current timezone" [lc_time_fmt "2003-08-15 13:40:00" "%Z"] [lang::conn::timezone]
}
-aa_register_case locale_language_fallback {
+aa_register_case \
+ -procs {
+ lang::message::lookup
+ } locale_language_fallback {
Test that we fall back to 'default locale for language' when requesting a message
which exists in default locale for language, but not in the current locale
} {
@@ -933,7 +969,12 @@
}
}
-aa_register_case upgrade {
+aa_register_case \
+ -procs {
+ lang::catalog::import
+ lang::message::edit
+ lang::message::get
+ } upgrade {
Test that a package can be upgraded with new
catalog files and that the resulting keys and messages
in the database can then be exported properly.
Index: openacs-4/packages/acs-subsite/tcl/test/acs-subsite-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/tcl/test/acs-subsite-procs.tcl,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/acs-subsite/tcl/test/acs-subsite-procs.tcl 11 Dec 2003 21:39:55 -0000 1.2
+++ openacs-4/packages/acs-subsite/tcl/test/acs-subsite-procs.tcl 15 Feb 2004 11:12:32 -0000 1.3
@@ -50,7 +50,7 @@
}
}
-aa_register_case acs_subsite_trivial_smoke_test {
+aa_register_case -cats smoke acs_subsite_trivial_smoke_test {
Minimal smoke test.
} {
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.21 -r1.22
--- openacs-4/packages/acs-tcl/tcl/test/acs-tcl-test-procs.tcl 28 Jan 2004 17:44:53 -0000 1.21
+++ openacs-4/packages/acs-tcl/tcl/test/acs-tcl-test-procs.tcl 15 Feb 2004 11:15:43 -0000 1.22
@@ -24,7 +24,7 @@
}
-aa_register_case util__sets_equal_p {
+aa_register_case -cats {api smoke} util__sets_equal_p {
Test the util_sets_equal_p proc.
@author Peter Marklund
@@ -45,7 +45,7 @@
return [list arg1 arg2]
}
-aa_register_case apm__test_info_file {
+aa_register_case -cats {api db smoke} apm__test_info_file {
Test that the procs for interfacing with package info files -
apm_generate_package_spec and
apm_read_package_info_file - handle the newly added
@@ -122,7 +122,7 @@
}
}
-aa_register_case apm__test_callback_get_set {
+aa_register_case -cats {api db smoke} apm__test_callback_get_set {
Test the procs apm_get_callback_proc,
apm_set_callback_proc,
apm_package_install_callbacks
@@ -162,7 +162,7 @@
}
}
-aa_register_case apm__test_callback_invoke {
+aa_register_case -cats {db api smoke} apm__test_callback_invoke {
Test the proc apm_invoke_callback_proc
@author Peter Marklund
@@ -199,7 +199,7 @@
}
}
-aa_register_case xml_get_child_node_content_by_path {
+aa_register_case -cats {api smoke} xml_get_child_node_content_by_path {
Test xml_get_child_node_content_by_path
} {
set tree [xml_parse -persist {
@@ -246,9 +246,7 @@
}
-aa_register_case -cats {
- script
-} -on_error {
+aa_register_case -cats {api} -on_error {
site_node::get_children returns root node!
} site_node_get_children {
Test site_node::get_children
@@ -290,7 +288,7 @@
}
-aa_register_case text_to_html {
+aa_register_case -cats {api smoke} text_to_html {
Test code the supposedly causes ad_html_to_text to break
} {
@@ -379,7 +377,7 @@
aa_log "Text version: $text_version"
}
-aa_register_case ad_page_contract_filters {
+aa_register_case -cats {api smoke} ad_page_contract_filters {
Test ad_page_contract_filters
} {
set filter integer
@@ -419,7 +417,7 @@
}
}
-aa_register_case export_vars {
+aa_register_case -cats {api smoke} export_vars {
Testing export_vars
} {
set foo 1
@@ -465,7 +463,7 @@
"$base?$export_no_base"
}
-aa_register_case site_node_verify_folder_name {
+aa_register_case -cats {api smoke} site_node_verify_folder_name {
Testing site_node::veriy_folder_name
} {
set main_site_node_id [site_node::get_node_id -url /]
@@ -505,7 +503,7 @@
}
-aa_register_case -cats db db__transaction {
+aa_register_case -cats {api db smoke} db__transaction {
test db_transaction
} {
@@ -676,7 +674,7 @@
}
-aa_register_case util__subset_p {
+aa_register_case -cats {api smoke} util__subset_p {
Test the util_subset_p proc.
@author Peter Marklund
@@ -691,7 +689,7 @@
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__tcl_file_common_errors {
+aa_register_case -cats {smoke} acs_tcl__tcl_file_syntax_errors {
Test all known tcl files for successful parsing "(in the [info complete] sense at least)" and other common errors.
@author Jeff Davis
@@ -715,13 +713,38 @@
# 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 -cats {} -error_level notice 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
+} {
+ # couple of local helper procs
+ proc ::tcl_p {file} {
+ return [expr [string match {*.tcl} $file] || [file isdirectory $file]]
}
+
+ # 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] {
+
+ set fp [open $file "r"]
+ set data [read $fp]
+ close $fp
+
+ if {![regexp {/packages/acs-tcl/tcl/test/acs-tcl-test-procs\.tcl$} $file match]} {
+ 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 {
+aa_register_case -cats {api smoke} util__randomize_list {
Test util::randomize_list
} {
aa_equals "Emtpy list" [util::randomize_list {}] {}
@@ -743,8 +766,11 @@
aa_true "Long random list" [util_sets_equal_p $org_list $randomized_list]
}
-aa_register_case acs_tcl__util_url_valid_p {
+aa_register_case -cats {api} acs_tcl__util_url_valid_p {
A very rudimentary test of util_url_valid_p
+
+ @creation-date 2004-01-10
+ @author Branimir Dolicki (bdolicki@branimir.com)
} {
foreach url {
"http://example.com"
@@ -768,3 +794,14 @@
aa_false "Invalid web URL $url" [util_url_valid_p "$url"]
}
}
+
+
+aa_register_case -cats {web smoke} -libraries tclwebtest front_page_1 {
+
+} {
+ #set ::auto_path "/usr/local/tclwebtest/lib"
+ #aa_log "auto_path: $auto_path"
+ ::tclwebtest::do_request "[ad_url]/"
+ ::tclwebtest::assert text "Main Site"
+
+}
Index: openacs-4/packages/acs-tcl/tcl/test/html-conversion-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/test/html-conversion-procs.tcl,v
diff -u -r1.5 -r1.6
--- openacs-4/packages/acs-tcl/tcl/test/html-conversion-procs.tcl 6 Feb 2004 12:36:55 -0000 1.5
+++ openacs-4/packages/acs-tcl/tcl/test/html-conversion-procs.tcl 15 Feb 2004 11:15:43 -0000 1.6
@@ -6,7 +6,7 @@
}
-aa_register_case ad_html_to_text_bold {
+aa_register_case -cats {api smoke} ad_html_to_text_bold {
Test if it converts b tags correctly.
@@ -21,13 +21,12 @@
}
-aa_register_case ad_html_to_text_clipped_link {
+aa_register_case -cats {api smoke} -bugs 386 -error_level warning \
+ ad_html_to_text_clipped_link {
Test if it converts clipped links.
- http://openacs.org/bugtracker/openacs/bug?bug_number=386
} {
-
# try with missing leading and trailing quote
foreach html {{
@@ -50,14 +49,14 @@
}
-aa_register_case ad_html_security_check_href_allowed {
+aa_register_case -cats {api smoke} ad_html_security_check_href_allowed {
tests is href attribute is allowed of A tags
} {
set html "An Link"
aa_true "href is allowed for A tags" [string equal [ad_html_security_check $html] ""]
}
-aa_register_case util_close_html_tags {
+aa_register_case -cats {api smoke} util_close_html_tags {
Tests closing HTML tags.
} {
aa_equals "" [util_close_html_tags "Foobar"] "Foobar"
@@ -72,7 +71,7 @@
}
-aa_register_case ad_html_text_convert {
+aa_register_case -cats {api smoke} ad_html_text_convert {
Testing ad_html_text_convert.
} {
#----------------------------------------------------------------------
@@ -129,7 +128,7 @@
}
-aa_register_case string_truncate {
+aa_register_case -cats {api smoke} string_truncate {
Testing string truncation
} {
aa_equals "" [string_truncate -len 5 -ellipsis "" -- "foobar greble"] ""
Index: openacs-4/packages/acs-tcl/tcl/test/log-test-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/test/Attic/log-test-procs.tcl,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/acs-tcl/tcl/test/log-test-procs.tcl 20 Nov 2003 13:22:50 -0000 1.1
+++ openacs-4/packages/acs-tcl/tcl/test/log-test-procs.tcl 15 Feb 2004 11:15:43 -0000 1.2
@@ -5,14 +5,12 @@
@creation-date 22 January 2003
}
-aa_register_case server_error_log {
+aa_register_case -cats {smoke} server_error_log {
Examine server error log.
-} {
+ } {
# Log error lines start with something like this:
# [19/Nov/2003:00:54:45][10491.319494][-conn1-] Error:
- catch { exec grep {^[^ ]* Error: } /web/lars/log/error.log } errors
-
set logfile [ns_info log]
if { [string equal $logfile "STDOUT"] } {
Index: openacs-4/packages/acs-tcl/tcl/test/site-nodes-test-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/test/site-nodes-test-procs.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/acs-tcl/tcl/test/site-nodes-test-procs.tcl 27 Nov 2003 15:24:46 -0000 1.3
+++ openacs-4/packages/acs-tcl/tcl/test/site-nodes-test-procs.tcl 15 Feb 2004 11:15:43 -0000 1.4
@@ -7,7 +7,7 @@
}
aa_register_case -cats {
- script
+ api
} site_node_update_cache {
Test site_node::update_cache
} {
@@ -86,7 +86,7 @@
}
aa_register_case -cats {
- script
+ api
} site_node_closest_ancestor_package {
Test site_node::closest_ancestor_package
} {
Index: openacs-4/packages/acs-templating/tcl/test/multirow-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/tcl/test/multirow-procs.tcl,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/acs-templating/tcl/test/multirow-procs.tcl 11 Dec 2003 21:39:57 -0000 1.2
+++ openacs-4/packages/acs-templating/tcl/test/multirow-procs.tcl 15 Feb 2004 11:16:29 -0000 1.3
@@ -5,7 +5,7 @@
}
-aa_register_case group_tag {
+aa_register_case -cats { api } -bugs { 428 } group_tag {
Testing more than one group tag inside multiple.
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.5 -r1.6 --- openacs-4/packages/acs-templating/tcl/test/spell-checker-procs.tcl 21 Nov 2003 11:34:52 -0000 1.5 +++ openacs-4/packages/acs-templating/tcl/test/spell-checker-procs.tcl 15 Feb 2004 11:16:29 -0000 1.6 @@ -6,7 +6,7 @@ @cvs-id $Id$ } -aa_register_case spellcheck__get_element_formtext { +aa_register_case -cats { api } spellcheck__get_element_formtext { Test the spell-check proc that does the actual spell-checking. } { @@ -145,7 +145,7 @@ } -aa_register_case spellcheck__spellcheck_properties { +aa_register_case -cats { api } 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. } { Index: openacs-4/packages/file-storage/tcl/test/file-storage-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/tcl/test/file-storage-procs.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/file-storage/tcl/test/file-storage-procs.tcl 14 Nov 2003 13:49:14 -0000 1.1 +++ openacs-4/packages/file-storage/tcl/test/file-storage-procs.tcl 15 Feb 2004 11:18:07 -0000 1.2 @@ -6,7 +6,9 @@ @cvs-id $Id$ } -aa_register_case fs_new_root_folder { +aa_register_case \ + -cats {api db smoke} \ + fs_new_root_folder { Test the fs::new_root_folder proc. } { Index: openacs-4/packages/lars-blogger/tcl/test/entry-test-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/tcl/test/entry-test-procs.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/lars-blogger/tcl/test/entry-test-procs.tcl 11 Dec 2003 21:40:06 -0000 1.2 +++ openacs-4/packages/lars-blogger/tcl/test/entry-test-procs.tcl 15 Feb 2004 11:21:38 -0000 1.3 @@ -2,7 +2,7 @@ Test cases for the entry API. } -aa_register_case rss_generation { +aa_register_case rss_generation -cats {api db smoke} { Test RSS generation } { # Test case written to expose bug in RSS datasource generation: Index: openacs-4/packages/lars-blogger/tcl/test/lars-blogger-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/tcl/test/lars-blogger-procs.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/lars-blogger/tcl/test/lars-blogger-procs.tcl 14 Nov 2003 12:00:51 -0000 1.1 +++ openacs-4/packages/lars-blogger/tcl/test/lars-blogger-procs.tcl 15 Feb 2004 11:21:38 -0000 1.2 @@ -6,7 +6,7 @@ @cvs-id $Id$ } -aa_register_case lars_blog_add_entry { +aa_register_case lars_blog_add_entry -cats {smoke api db} { Test the lars_blog_entry_add proc. } {