Index: openacs-4/packages/acs-authentication/tcl/test/acs-authentication-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-authentication/tcl/test/acs-authentication-procs.tcl,v diff -u -N -r1.53.2.15 -r1.53.2.16 --- openacs-4/packages/acs-authentication/tcl/test/acs-authentication-procs.tcl 13 Oct 2020 08:24:08 -0000 1.53.2.15 +++ openacs-4/packages/acs-authentication/tcl/test/acs-authentication-procs.tcl 15 Feb 2021 17:53:26 -0000 1.53.2.16 @@ -38,18 +38,20 @@ #### - aa_register_case \ -cats {api} \ -procs { + acs::test::user::create + acs_package_root_dir acs_user::change_state + acs_user::create_portrait acs_user::delete + acs_user::erase_portrait acs_user::get_by_username + acs_user::get_portrait_id + acs_user::get_user_info auth::authenticate auth::create_user - acs_user::get_portrait_id - acs_user::erase_portrait - acs_user::create_portrait } \ auth_authenticate { Test the auth::authenticate proc. @@ -201,6 +203,8 @@ acs_user::get_by_username ad_generate_random_string auth::create_user + acs::test::user::create + acs_user::get } auth_create_user { Test the auth::create_user proc. @@ -233,7 +237,7 @@ } aa_false "No creation_message for successful creation" \ - {[info exists user_info(creation_message)] && $user_info(creation_message) ne ""} + {[info exists user_info(creation_message)] && $user_info(creation_message) ne ""} aa_true "returns user_id" [info exists user_info(user_id)] if { [info exists user_info(user_id)] } { @@ -259,9 +263,9 @@ array unset elm_msgs array set elm_msgs $user_info(element_messages) aa_true "element_message for username exists" \ - {[info exists elm_msgs(username)] && $elm_msgs(username) ne ""} + {[info exists elm_msgs(username)] && $elm_msgs(username) ne ""} aa_true "element_message for email exists" \ - {[info exists elm_msgs(email)] && $elm_msgs(email) ne ""} + {[info exists elm_msgs(email)] && $elm_msgs(email) ne ""} } set user_id [acs_user::get_by_username -authority_id $authority_id -username $username] if { $user_id ne "" } { @@ -288,7 +292,7 @@ array set elm_msgs $user_info(element_messages) if { [aa_true "element_message(email) exists" \ - {[info exists elm_msgs(email)] && $elm_msgs(email) ne ""} ]} { + {[info exists elm_msgs(email)] && $elm_msgs(email) ne ""} ]} { aa_log "element_message(email) = $elm_msgs(email)" } if { [aa_true "element_message(first_names) exists" [info exists elm_msgs(first_names)] ]} { @@ -439,6 +443,8 @@ aa_register_case \ -cats {api} \ -procs { + aa_stub + acs::test::user::create acs_user::delete ad_acs_kernel_id ad_check_password @@ -502,6 +508,7 @@ -procs { auth::password::recover_password auth::test::get_password_vars + aa_stub } \ auth_password_recover { Test the auth::password::recover_password proc. @@ -577,7 +584,10 @@ aa_register_case \ -cats {api} \ -procs { + aa_stub + acs::test::user::create acs_user::delete + acs_user::get acs_user::get_by_username auth::authentication::Authenticate auth::authority::local @@ -645,11 +655,13 @@ api db } -procs { auth::authority::create - auth::authority::edit auth::authority::delete - auth::authority::get_short_names + auth::authority::edit + auth::authority::get auth::authority::get_authority_options auth::authority::get_id + auth::authority::get_short_names + db_list_of_lists } auth_authority_api { Test authorty creation, edition, deletion and some retrieval api. } { @@ -833,10 +845,13 @@ aa_register_case \ -cats {api} \ -procs { + aa_stub ad_acs_kernel_id ad_generate_random_string + ad_parameter_cache auth::UseEmailForLoginP auth::authenticate + auth::authority::get_id auth::authority::local auth::create_user auth::get_registration_elements @@ -912,11 +927,13 @@ aa_register_case \ -cats {api} \ -procs { + aa_stub + acs::test::user::create + acs_user::get_user_info ad_acs_kernel_id ad_generate_random_string ad_parameter_cache auth::create_user - acs_user::get_user_info auth::password::change parameter::set_value } \ @@ -987,6 +1004,7 @@ auth::authority::edit auth::authority::get auth::authority::get_element + auth::authority::get_id } \ auth_authority_edit { Test authority edit Index: openacs-4/packages/acs-authentication/tcl/test/sync-test-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-authentication/tcl/test/sync-test-procs.tcl,v diff -u -N -r1.28.2.2 -r1.28.2.3 --- openacs-4/packages/acs-authentication/tcl/test/sync-test-procs.tcl 3 Jul 2020 07:53:44 -0000 1.28.2.2 +++ openacs-4/packages/acs-authentication/tcl/test/sync-test-procs.tcl 15 Feb 2021 17:53:27 -0000 1.28.2.3 @@ -1013,7 +1013,11 @@ aa_register_case \ -cats {api smoke} \ - -procs acs_sc::invoke \ + -procs { + ad_url + acs_sc::invoke + util_current_location + } \ sync_http_get_document { Test the HTTPGet implementation of GetDocument service contract. } { Index: openacs-4/packages/acs-content-repository/tcl/test/content-extlink-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/tcl/test/Attic/content-extlink-procs.tcl,v diff -u -N -r1.1.2.3 -r1.1.2.4 --- openacs-4/packages/acs-content-repository/tcl/test/content-extlink-procs.tcl 1 Sep 2020 17:17:14 -0000 1.1.2.3 +++ openacs-4/packages/acs-content-repository/tcl/test/content-extlink-procs.tcl 15 Feb 2021 17:53:27 -0000 1.1.2.4 @@ -13,6 +13,7 @@ content::extlink::delete content::extlink::copy content::extlink::name + content::folder::register_content_type } \ content_extlink { content extlink test Index: openacs-4/packages/acs-content-repository/tcl/test/content-search-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/tcl/test/content-search-procs.tcl,v diff -u -N -r1.6 -r1.6.2.1 --- openacs-4/packages/acs-content-repository/tcl/test/content-search-procs.tcl 20 Jul 2018 08:41:29 -0000 1.6 +++ openacs-4/packages/acs-content-repository/tcl/test/content-search-procs.tcl 15 Feb 2021 17:53:27 -0000 1.6.2.1 @@ -72,6 +72,7 @@ cr_item_search::assert_not_in_queue cr_item_search::remove_from_queue cr_item_search::test_setup + db_name } \ cr_item_search_triggers { Test search update trigger Index: openacs-4/packages/acs-datetime/tcl/test/acs-datetime-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-datetime/tcl/test/acs-datetime-procs.tcl,v diff -u -N -r1.3.2.6 -r1.3.2.7 --- openacs-4/packages/acs-datetime/tcl/test/acs-datetime-procs.tcl 19 Aug 2020 15:04:00 -0000 1.3.2.6 +++ openacs-4/packages/acs-datetime/tcl/test/acs-datetime-procs.tcl 15 Feb 2021 17:53:27 -0000 1.3.2.7 @@ -94,13 +94,14 @@ } aa_register_case -procs { - dt_sysdate - dt_systime - } -cats { - api - production_safe - } dt_sysdate_systime { - Test dt_sysdate and dt_systime procs. + dt_sysdate + dt_systime + dt_valid_time_p +} -cats { + api + production_safe +} dt_sysdate_systime { + Test dt_sysdate and dt_systime procs. } { # # Test if the format is correct @@ -189,15 +190,17 @@ } aa_register_case -procs { - dt_month_names - dt_month_abbrev - dt_ansi_to_pretty - dt_prev_month_name - dt_next_month_name - } -cats { - api - } dt_localized_procs { - Test procs with localized date/time strings. + dt_month_names + dt_month_abbrev + dt_ansi_to_pretty + dt_prev_month_name + dt_next_month_name + lang::system::locale + lang::system::set_locale +} -cats { + api +} dt_localized_procs { + Test procs with localized date/time strings. } { aa_run_with_teardown -rollback -test_code { # 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 -N -r1.71.2.31 -r1.71.2.32 --- openacs-4/packages/acs-tcl/tcl/test/acs-tcl-test-procs.tcl 15 Feb 2021 13:41:25 -0000 1.71.2.31 +++ openacs-4/packages/acs-tcl/tcl/test/acs-tcl-test-procs.tcl 15 Feb 2021 17:53:27 -0000 1.71.2.32 @@ -57,8 +57,10 @@ aa_register_case \ -cats {api db smoke} \ -procs { + acs_package_root_dir apm_generate_package_spec apm_read_package_info_file + apm_supported_callback_types db_dml } \ apm__test_info_file { @@ -189,8 +191,14 @@ aa_register_case \ -cats {db api smoke} \ - -procs apm_invoke_callback_proc \ - apm__test_callback_invoke { + -procs { + apm_invoke_callback_proc + apm_remove_callback_proc + apm_set_callback_proc + apm_supported_callback_types + apm_test_callback_file_path + apm_version_id_from_package_key + } apm__test_callback_invoke { Test the proc apm_invoke_callback_proc @author Peter Marklund @@ -1040,7 +1048,11 @@ aa_register_case \ -cats {web smoke} \ - front_page_1 { + -procs { + acs::test::http + acs::test::reply_has_status_code + site_node::get_from_url + } front_page_1 { } { set d [acs::test::http -depth 3 /] @@ -1050,8 +1062,9 @@ aa_register_case \ -cats {smoke api} \ - -procs util::age_pretty \ - util__age_pretty { + -procs { + util::age_pretty + } util__age_pretty { Test the util::age_pretty proc. } { aa_log "Forcing locale to en_US for all strings so that tests work in any locale" @@ -1112,7 +1125,10 @@ } aa_register_case \ - -procs db_bind_var_substitution \ + -procs { + db_bind_var_substitution + db_type + } \ -cats {api} \ db_bind_var_substitution { Test the proc db_bind_var_substitution. Index: openacs-4/packages/acs-tcl/tcl/test/apm-parameter-test-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/test/apm-parameter-test-procs.tcl,v diff -u -N -r1.5.2.3 -r1.5.2.4 --- openacs-4/packages/acs-tcl/tcl/test/apm-parameter-test-procs.tcl 19 Oct 2020 14:54:19 -0000 1.5.2.3 +++ openacs-4/packages/acs-tcl/tcl/test/apm-parameter-test-procs.tcl 15 Feb 2021 17:53:27 -0000 1.5.2.4 @@ -15,7 +15,7 @@ } \ parameter_register_test { Test the registration of a parameter -} { +} { set parameter_id [db_nextval "acs_object_id_seq"] set parameter_name [ad_generate_random_string] set description "Description for the new parameter" @@ -26,7 +26,7 @@ aa_log "Registering an instance parameter" apm_parameter_register -parameter_id $parameter_id -scope $scope $parameter_name $description $package_key $default_value $datatype - set package_id [apm_package_id_from_key $package_key] + set package_id [apm_package_id_from_key $package_key] aa_true "check apm_parameter_register instance parameter" [string equal [parameter::get -package_id $package_id -parameter $parameter_name] $default_value] aa_log "Unregistering an instance parameter" apm_parameter_unregister -parameter_id $parameter_id @@ -53,6 +53,8 @@ parameter::set_from_package_key parameter::set_global_value parameter::set_value + db_list_of_lists + util::random } \ parameter__check_procs { Test the parameter::* procs Index: openacs-4/packages/acs-tcl/tcl/test/application-data-link-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/test/application-data-link-procs.tcl,v diff -u -N -r1.8.2.1 -r1.8.2.2 --- openacs-4/packages/acs-tcl/tcl/test/application-data-link-procs.tcl 2 Sep 2019 16:47:36 -0000 1.8.2.1 +++ openacs-4/packages/acs-tcl/tcl/test/application-data-link-procs.tcl 15 Feb 2021 17:53:27 -0000 1.8.2.2 @@ -6,6 +6,7 @@ -cats api \ -procs { ad_url + application_data_link::scan_for_links } \ data_links_scan_links { Test scanning content for object URLs Index: openacs-4/packages/acs-tcl/tcl/test/community-core-test-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/test/community-core-test-procs.tcl,v diff -u -N -r1.9.2.3 -r1.9.2.4 --- openacs-4/packages/acs-tcl/tcl/test/community-core-test-procs.tcl 27 Feb 2020 14:23:39 -0000 1.9.2.3 +++ openacs-4/packages/acs-tcl/tcl/test/community-core-test-procs.tcl 15 Feb 2021 17:53:27 -0000 1.9.2.4 @@ -11,6 +11,7 @@ -procs { party::email party::get_by_email + acs::test::user::create } \ community_cc_procs \ { @@ -31,10 +32,13 @@ [string match $email_p [string tolower $user_info(email)]] } -} + } + aa_register_case \ -cats {api smoke} \ -procs { + auth::authority::get_id + auth::create_user party::email person::delete person::get @@ -109,6 +113,8 @@ aa_register_case \ -cats {api smoke} \ -procs { + auth::authority::get_id + auth::create_user party::get_by_email party::update } \ Index: openacs-4/packages/acs-tcl/tcl/test/datamodel-test-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/test/datamodel-test-procs.tcl,v diff -u -N -r1.20.2.3 -r1.20.2.4 --- openacs-4/packages/acs-tcl/tcl/test/datamodel-test-procs.tcl 8 Oct 2020 06:50:52 -0000 1.20.2.3 +++ openacs-4/packages/acs-tcl/tcl/test/datamodel-test-procs.tcl 15 Feb 2021 17:53:27 -0000 1.20.2.4 @@ -10,7 +10,11 @@ aa_register_case \ -cats {api db smoke production_safe} \ -error_level warning \ - -procs {db_name} \ + -procs { + db_name + aa_log_result + ad_decode + } \ datamodel__named_constraints { Check that all the constraints meet the constraint naming @@ -22,7 +26,8 @@ set db_is_pg_p [string equal [db_name] "PostgreSQL"] if { $db_is_pg_p } { - set get_constraints "select + set get_constraints { + select cla.relname as table_name, con.conrelid, con.conname as constraint_name, @@ -35,23 +40,30 @@ END as constraint_type, con.conkey, '' as search_condition - from + from pg_constraint con, pg_class cla - where con.conrelid != 0 and cla.oid=con.conrelid - order by table_name,constraint_name" - set get_constraint_col "select attname from pg_attribute where attnum = :columns_list and attrelid = :conrelid" + where con.conrelid != 0 and cla.oid=con.conrelid + order by table_name,constraint_name + } + set get_constraint_col { + select attname from pg_attribute where attnum = :columns_list and attrelid = :conrelid + } } else { # Oracle - set get_constraints "select + set get_constraints { + select acc.*, ac.search_condition, decode(ac.constraint_type,'C','CK','R','FK','P','PK','U','UN','') as constraint_type - from + from (select count(column_name) as columns, table_name, constraint_name from user_cons_columns group by table_name, constraint_name) acc, user_constraints ac - where ac.constraint_name = acc.constraint_name - order by acc.table_name, acc.constraint_name" - set get_constraint_col "select column_name from user_cons_columns where constraint_name = :constraint_name" + where ac.constraint_name = acc.constraint_name + order by acc.table_name, acc.constraint_name + } + set get_constraint_col { + select column_name from user_cons_columns where constraint_name = :constraint_name + } } db_foreach check_constraints $get_constraints { @@ -102,7 +114,10 @@ aa_register_case \ -cats {db smoke production_safe} \ - -procs {db_table_exists} \ + -procs { + db_table_exists + aa_log_result + } \ datamodel__acs_object_type_check { Check that the object type tables exist and that the id column is @@ -164,7 +179,10 @@ aa_register_case \ -cats {db smoke production_safe} \ - -procs {db_column_type db_columns} \ + -procs { + db_column_type db_columns + aa_log_result + } \ datamodel__acs_attribute_check { Check that the acs_attribute column is present and the Index: openacs-4/packages/acs-tcl/tcl/test/db-proc-test-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/test/Attic/db-proc-test-procs.tcl,v diff -u -N -r1.1.2.8 -r1.1.2.9 --- openacs-4/packages/acs-tcl/tcl/test/db-proc-test-procs.tcl 19 Oct 2020 12:55:47 -0000 1.1.2.8 +++ openacs-4/packages/acs-tcl/tcl/test/db-proc-test-procs.tcl 15 Feb 2021 17:53:27 -0000 1.1.2.9 @@ -10,8 +10,12 @@ -cats {api db smoke} \ -error_level "error" \ -procs { - ::db_multirow - ::template::multirow + db_dml + db_foreach + db_multirow + db_string + db_transaction + template::multirow } \ db__transaction_bug_3440 { @@ -32,66 +36,66 @@ aa_log "Start test section 1" db_transaction { - # - # Insert an element to the test table - # - set dml "INSERT INTO test_tbl1 (value) values('val1') RETURNING id;" - set row_id [db_string noxql $dml] - set sql_row_id "SELECT value FROM test_tbl1 where id = :row_id" + # + # Insert an element to the test table + # + set dml "INSERT INTO test_tbl1 (value) values('val1') RETURNING id;" + set row_id [db_string noxql $dml] + set sql_row_id "SELECT value FROM test_tbl1 where id = :row_id" + + # + # Retrieve it once. + # + set sql "SELECT value FROM test_tbl1 where id = :row_id" + set res1 [db_string noxql $sql -default "None"] + aa_equals "New row exists before db_multirow call" $res1 "val1" + + # + # Run a query returning more than one row in a + # "db_foreach" loop, performing as well SQL queries + # and try to get value inserted above after the loop. + # + set sql "SELECT privilege FROM acs_privileges fetch first 2 rows only" + db_foreach noxql $sql { + set temp1 [db_string noxql "SELECT 1 FROM dual"] + aa_log "... db_foreach got '$temp1'" + } + set res2 [db_string noxql $sql_row_id -default "None"] + aa_equals "New row exists after db_foreach" $res2 "val1" + + # + # Run a query returning a single row in a + # "db_multirow" loop, performing as well SQL queries + # and try to get value inserted above after the loop. + # + set sql "SELECT max(privilege) FROM acs_privileges" + db_multirow -local mrow noxql $sql { + # Code executed for each row. Set extended columns, etc. + set temp1 [db_string noxql "SELECT 1 FROM dual"] + } + set res2 [db_string noxql $sql_row_id -default "None"] + aa_equals "New row exists after db_multirow with 1 tuple" $res2 "val1" + + # + # Run a query returning more than a row in a + # "db_multirow" loop, performing as well SQL queries + # and try to get value inserted above after the loop. + # + set sql "SELECT privilege FROM acs_privileges fetch first 2 rows only" + db_multirow -local mrow noxql $sql { + # Code executed for each row. Set extended columns, etc. + set temp1 [db_string noxql "SELECT 1 FROM dual"] + } - # - # Retrieve it once. - # - set sql "SELECT value FROM test_tbl1 where id = :row_id" - set res1 [db_string noxql $sql -default "None"] - aa_equals "New row exists before db_multirow call" $res1 "val1" - - # - # Run a query returning more than one row in a - # "db_foreach" loop, performing as well SQL queries - # and try to get value inserted above after the loop. - # - set sql "SELECT privilege FROM acs_privileges fetch first 2 rows only" - db_foreach noxql $sql { - set temp1 [db_string noxql "SELECT 1 FROM dual"] - aa_log "... db_foreach got '$temp1'" + # Asof acs-tcl 5.10.0d31 + # If db_multirow above is limited to 1 row, the following succeeds. + # If the db_multirow has more than 1 row, it fails. + set res2 [db_string noxql $sql_row_id -default "None"] + aa_equals "New row exists after db_multirow with 2 tuples" $res2 "val1" + } - set res2 [db_string noxql $sql_row_id -default "None"] - aa_equals "New row exists after db_foreach" $res2 "val1" - - # - # Run a query returning a single row in a - # "db_multirow" loop, performing as well SQL queries - # and try to get value inserted above after the loop. - # - set sql "SELECT max(privilege) FROM acs_privileges" - db_multirow -local mrow noxql $sql { - # Code executed for each row. Set extended columns, etc. - set temp1 [db_string noxql "SELECT 1 FROM dual"] - } - set res2 [db_string noxql $sql_row_id -default "None"] - aa_equals "New row exists after db_multirow with 1 tuple" $res2 "val1" - - # - # Run a query returning more than a row in a - # "db_multirow" loop, performing as well SQL queries - # and try to get value inserted above after the loop. - # - set sql "SELECT privilege FROM acs_privileges fetch first 2 rows only" - db_multirow -local mrow noxql $sql { - # Code executed for each row. Set extended columns, etc. - set temp1 [db_string noxql "SELECT 1 FROM dual"] - } - - # Asof acs-tcl 5.10.0d31 - # If db_multirow above is limited to 1 row, the following succeeds. - # If the db_multirow has more than 1 row, it fails. - set res2 [db_string noxql $sql_row_id -default "None"] - aa_equals "New row exists after db_multirow with 2 tuples" $res2 "val1" - - } aa_log "Start test section 2" - + # # Create a multirow woth 0 entries and append a row "manually" # For details, see # https://openacs.org/bugtracker/openacs/bug?bug_number=3441 @@ -129,6 +133,9 @@ aa_register_case -error_level warning -cats { db production_safe + } -procs { + db_type + db_string } nullchar { Null character is properly translated in a round trip through the database engine. @@ -155,9 +162,8 @@ set status [catch { db_string noxql $query } value copts] - aa_equals [list $type {Sql executed successfully?}] $status 0 - aa_true [list $type {Value is the null character?}] [ - expr {$value eq "\x00"}] + aa_equals [list $type {SQL executed successfully?}] $status 0 + aa_true [list $type {Value is the null character?}] {$value eq "\x00"} } } 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.20.2.14 -r1.20.2.15 --- openacs-4/packages/acs-tcl/tcl/test/doc-check-procs.tcl 14 Feb 2021 21:04:55 -0000 1.20.2.14 +++ openacs-4/packages/acs-tcl/tcl/test/doc-check-procs.tcl 15 Feb 2021 17:53:27 -0000 1.20.2.15 @@ -7,7 +7,9 @@ @cvs-id $Id$ } -aa_register_case -cats {smoke production_safe} documentation__check_proc_doc { +aa_register_case -cats {smoke production_safe} -procs { + aa_log_result +} documentation__check_proc_doc { checks if documentation exists for public procs. @author Jeff Davis davis@xarg.net @@ -33,7 +35,9 @@ } -aa_register_case -cats {smoke production_safe} naming__proc_naming { +aa_register_case -cats {smoke production_safe} -procs { + aa_log_result +} naming__proc_naming { Check if names of Tcl procs follow the naming conventions https://openacs.org/xowiki/Naming @@ -89,7 +93,9 @@ aa_log "Found $good good of $count checked" } -aa_register_case -cats {smoke production_safe} -error_level warning documentation__check_deprecated_see { +aa_register_case -cats {smoke production_safe} -error_level warning -procs { + aa_log_result +} documentation__check_deprecated_see { checks if deprecated procs have an @see clause @author Jeff Davis davis@xarg.net @@ -113,7 +119,10 @@ aa_log "Found $good of $count procs checked" } -aa_register_case -cats {smoke production_safe} -error_level warning documentation__check_typos { +aa_register_case -cats {smoke production_safe} -error_level warning -procs { + aa_log_result + acs_package_root_dir +} documentation__check_typos { Search for spelling errors in the proc documentation, using a list of common typos based on the one included in the lintian Debian package: @@ -133,7 +142,7 @@ @creation-date 2018-07-23 } { - set typo_list "[acs_package_root_dir "acs-tcl"]/tcl/test/doc-check-procs-common-typos.txt" + set typo_list "[acs_package_root_dir acs-tcl]/tcl/test/doc-check-procs-common-typos.txt" set typos [dict create] # Create the typo dictionary with values from the common typos file @@ -195,7 +204,9 @@ aa_log "Documentation seems typo free in $good of $count checked procs (total typo checks: $checks)" } -aa_register_case -cats {smoke production_safe} -error_level warning documentation__check_parameters { +aa_register_case -cats {smoke production_safe} -error_level warning -procs { + aa_log_result +} documentation__check_parameters { Check if the parameters defined in the proc doc as '@param' are actual parameters. Index: openacs-4/packages/acs-tcl/tcl/test/file-test-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/test/file-test-procs.tcl,v diff -u -N -r1.21.2.4 -r1.21.2.5 --- openacs-4/packages/acs-tcl/tcl/test/file-test-procs.tcl 13 Jul 2020 12:02:33 -0000 1.21.2.4 +++ openacs-4/packages/acs-tcl/tcl/test/file-test-procs.tcl 15 Feb 2021 17:53:27 -0000 1.21.2.5 @@ -8,7 +8,11 @@ aa_register_case \ -cats {smoke production_safe} \ - -procs {apm_get_installed_versions apm_get_package_files} \ + -procs { + apm_get_installed_versions + apm_get_package_files + ad_file + } \ files__tcl_file_syntax_errors { Test all known Tcl files for successful parsing "(in the [info complete] sense at least)" and other common errors. @@ -45,7 +49,10 @@ aa_register_case \ -cats {smoke production_safe} \ -error_level error \ - -procs {} \ + -procs { + ad_file + ad_find_all_files + } \ files__tcl_file_common_errors { Check for some common error patterns. @@ -80,7 +87,11 @@ aa_register_case \ -cats {smoke production_safe} \ - -procs {apm_read_package_info_file} \ + -procs { + apm_read_package_info_file + aa_log_result + apm_package_installed_p + } \ files__check_info_files { Check that all the info files parse correctly and are @@ -142,6 +153,7 @@ apm_get_package_files apm_guess_db_type apm_version_sortable + ad_file } \ files__check_upgrade_ordering { @@ -213,6 +225,7 @@ apm_get_package_files db_qd_internal_prepare_queryfile_content xml_parse + ad_file } \ files__check_xql_files { @@ -328,7 +341,11 @@ aa_register_case \ -cats {production_safe} \ -error_level notice \ - -procs {} \ + -procs { + ad_file + apm_get_installed_versions + apm_get_package_files + } \ files__trailing_whitespace { Looks for trailing whitespace: spaces or tabs at the end of lines. @@ -396,7 +413,11 @@ aa_register_case \ -cats {smoke production_safe} \ -error_level warning \ - -procs {} \ + -procs { + ad_file + apm_get_installed_versions + apm_get_package_files + } \ files__page_contracts { Checks for files without 'ad_page_contract', 'ad_include_contract' Index: openacs-4/packages/acs-tcl/tcl/test/http-client-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/test/Attic/http-client-procs.tcl,v diff -u -N -r1.1.2.14 -r1.1.2.15 --- openacs-4/packages/acs-tcl/tcl/test/http-client-procs.tcl 1 Feb 2021 10:51:09 -0000 1.1.2.14 +++ openacs-4/packages/acs-tcl/tcl/test/http-client-procs.tcl 15 Feb 2021 17:53:27 -0000 1.1.2.15 @@ -139,6 +139,7 @@ aa_register_case \ -cats {api smoke} \ -procs { + export_vars util::http::get util::http::post ns_http Index: openacs-4/packages/acs-tcl/tcl/test/security-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/test/Attic/security-procs.tcl,v diff -u -N -r1.1.2.2 -r1.1.2.3 --- openacs-4/packages/acs-tcl/tcl/test/security-procs.tcl 25 Jan 2021 16:43:33 -0000 1.1.2.2 +++ openacs-4/packages/acs-tcl/tcl/test/security-procs.tcl 15 Feb 2021 17:53:27 -0000 1.1.2.3 @@ -7,6 +7,9 @@ aa_register_case \ -cats { api } \ -procs { + ad_user_login + apm_package_id_from_key + parameter::get sec_change_user_auth_token } \ logout_from_everywhere { @@ -62,7 +65,7 @@ ad_secure_token } { set cookie_value [ns_getcookie -include_set_cookies true -- $cookie ""] - if {$cookie_value ne ""} { + if {$cookie_value ne ""} { lappend cookies $cookie=\"${cookie_value}\" } } 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 -N -r1.12.2.1 -r1.12.2.2 --- openacs-4/packages/acs-tcl/tcl/test/site-nodes-test-procs.tcl 2 Sep 2019 16:39:44 -0000 1.12.2.1 +++ openacs-4/packages/acs-tcl/tcl/test/site-nodes-test-procs.tcl 15 Feb 2021 17:53:27 -0000 1.12.2.2 @@ -10,6 +10,7 @@ -cats { api } \ -procs { site_node::delete + site_node::get site_node::get_node_id site_node::get_url site_node::get_url_from_object_id Index: openacs-4/packages/acs-tcl/tcl/test/test-membership-rel-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/test/test-membership-rel-procs.tcl,v diff -u -N -r1.7 -r1.7.2.1 --- openacs-4/packages/acs-tcl/tcl/test/test-membership-rel-procs.tcl 3 Nov 2018 11:15:16 -0000 1.7 +++ openacs-4/packages/acs-tcl/tcl/test/test-membership-rel-procs.tcl 15 Feb 2021 17:53:27 -0000 1.7.2.1 @@ -17,6 +17,7 @@ membership_rel::reject membership_rel::unapprove membership_rel::change_state + ::acs::test::user::create } \ ad_proc_change_state_member { Index: openacs-4/packages/acs-tcl/tcl/test/test-permissions-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/test/test-permissions-procs.tcl,v diff -u -N -r1.7.2.2 -r1.7.2.3 --- openacs-4/packages/acs-tcl/tcl/test/test-permissions-procs.tcl 8 Aug 2020 11:19:23 -0000 1.7.2.2 +++ openacs-4/packages/acs-tcl/tcl/test/test-permissions-procs.tcl 15 Feb 2021 17:53:27 -0000 1.7.2.3 @@ -15,6 +15,7 @@ permission::revoke site_node::instantiate_and_mount db_nextval + acs::test::user::create } \ ad_proc_permission_grant_and_revoke { @@ -98,6 +99,7 @@ permission::revoke site_node::instantiate_and_mount db_nextval + acs::test::user::create } \ ad_proc_permission_permission_p { 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 -N -r1.5.2.1 -r1.5.2.2 --- openacs-4/packages/acs-templating/tcl/test/date-procs.tcl 25 Apr 2019 09:21:16 -0000 1.5.2.1 +++ openacs-4/packages/acs-templating/tcl/test/date-procs.tcl 15 Feb 2021 17:53:27 -0000 1.5.2.2 @@ -14,8 +14,9 @@ -procs { template::util::date::get_property template::util::date::now - } \ - sql_date { + db_type + db_version + } sql_date { test sql date transform } { aa_run_with_teardown \ @@ -39,11 +40,11 @@ } { aa_run_with_teardown \ -test_code { - + set clock [clock scan "2019-04-25 16:19:00"] set date [template::util::date::now_min_interval -clock $clock] aa_equals "interval up from 19" $date {2019 4 25 16 20 0 {DD MONTH YYYY}} - + set clock [clock scan "2019-04-25 16:20:00"] set date [template::util::date::now_min_interval -clock $clock] aa_equals "interval same " $date {2019 4 25 16 20 0 {DD MONTH YYYY}}