Index: openacs-4/packages/acs-core-docs/www/files/tutorial/myfirstpackage-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/files/tutorial/myfirstpackage-procs.tcl,v diff -u -r1.7 -r1.8 --- openacs-4/packages/acs-core-docs/www/files/tutorial/myfirstpackage-procs.tcl 7 Aug 2017 23:47:54 -0000 1.7 +++ openacs-4/packages/acs-core-docs/www/files/tutorial/myfirstpackage-procs.tcl 18 Jun 2018 07:28:49 -0000 1.8 @@ -14,7 +14,7 @@ -test_code { set name [ad_generate_random_string] set new_id [mfp::note::add -title $name] - aa_true "Note add succeeded" ([info exists new_id] && $new_id ne "") + aa_true "Note add succeeded" {$new_id ne ""} mfp::note::get -item_id $new_id -array note_array aa_true "Note contains correct title" [string equal $note_array(title) $name] @@ -39,7 +39,7 @@ set name {-Bad [BAD] \077 { $Bad}} append name [ad_generate_random_string] set new_id [mfp::note::add -title $name] - aa_true "Note add succeeded" ([info exists new_id] && $new_id ne "") + aa_true "Note add succeeded" {$new_id ne ""} mfp::note::get -item_id $new_id -array note_array aa_true "Note contains correct title" [string equal $note_array(title) $name] Index: openacs-4/packages/acs-core-docs/www/xml/developers-guide/tutorial-debug.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/xml/developers-guide/tutorial-debug.xml,v diff -u -r1.14 -r1.15 --- openacs-4/packages/acs-core-docs/www/xml/developers-guide/tutorial-debug.xml 7 Aug 2017 23:47:54 -0000 1.14 +++ openacs-4/packages/acs-core-docs/www/xml/developers-guide/tutorial-debug.xml 18 Jun 2018 07:28:49 -0000 1.15 @@ -146,7 +146,7 @@ set name [ad_generate_random_string] set new_id [mfp::note::add -title $name] - aa_true "Note add succeeded" ([info exists new_id] && $new_id ne "") + aa_true "Note add succeeded" {$new_id ne ""} To test our simple case, we must load the test file into the system (just as with the /tcl file in the basic tutorial, since the file didn't exist when the system started, the system doesn't know about it.) To make this file take effect, go to the APM and choose "Reload changed" for "MyFirstPackage". Since we'll be changing it frequently, select "watch this file" on the next page. This will cause the system to check this file every time any page is requested, which is bad for production systems but convenient for developing. We can also add some aa_register_case flags to make it easier to run the test. The -procs flag, which indicates which procs are tested by this test case, makes it easier to find procs in your package that aren't tested at all. The -cats flag, setting categories, makes it easier to control which tests to run. The smoke test setting means that this is a basic test case that can and should be run any time you are doing any test. (a definition of "smoke test") Once the file is loaded, go to ACS Automated Testing and click on myfirstpackage. You should see your test case. Run it and examine the results. Index: openacs-4/packages/acs-subsite/www/register/recover-password.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/register/recover-password.tcl,v diff -u -r1.15 -r1.16 --- openacs-4/packages/acs-subsite/www/register/recover-password.tcl 3 Apr 2018 14:43:58 -0000 1.15 +++ openacs-4/packages/acs-subsite/www/register/recover-password.tcl 18 Jun 2018 07:28:49 -0000 1.16 @@ -36,7 +36,7 @@ # Display form to collect username and authority set authority_options [auth::authority::get_authority_options] -if { (![info exists authority_id] || $authority_id eq "") } { +if { $authority_id eq "" } { set authority_id [lindex $authority_options 0 1] } Index: openacs-4/packages/acs-templating/tcl/form-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/tcl/form-procs.tcl,v diff -u -r1.53 -r1.54 --- openacs-4/packages/acs-templating/tcl/form-procs.tcl 14 Jun 2018 12:50:10 -0000 1.53 +++ openacs-4/packages/acs-templating/tcl/form-procs.tcl 18 Jun 2018 07:28:49 -0000 1.54 @@ -638,7 +638,9 @@ # If we're in edit mode, output the action upvar #$level $id:formaction formaction - if { $properties(mode) eq "edit" && ([info exists formaction] && $formaction ne "") } { + if { $properties(mode) eq "edit" + && ([info exists formaction] && $formaction ne "") + } { upvar #$level $id:formaction action append output [export_vars -form { { form\:formaction $formaction } }] } Index: openacs-4/packages/acs-templating/www/scripts/xinha/attach-file.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/scripts/xinha/attach-file.tcl,v diff -u -r1.21 -r1.22 --- openacs-4/packages/acs-templating/www/scripts/xinha/attach-file.tcl 7 Apr 2018 19:37:20 -0000 1.21 +++ openacs-4/packages/acs-templating/www/scripts/xinha/attach-file.tcl 18 Jun 2018 07:28:49 -0000 1.22 @@ -101,7 +101,9 @@ element set_value upload_form f_href $f_href } # ensure that Link Title is specified - if { (![info exists f_title] || $f_title eq "") && ([info exists url_ok_btn] && $url_ok_btn ne "") } { + if { (![info exists f_title] || $f_title eq "") + && ([info exists url_ok_btn] && $url_ok_btn ne "") + } { template::form::set_error upload_form f_title "Specify a [_ acs-templating.Link_Title]" } set error_p 0