_acs-api-browser__acs_api_browser_apidoc_tclcode_to_html (private)
_acs-api-browser__acs_api_browser_apidoc_tclcode_to_html
Defined in packages/acs-api-browser/tcl/test/acs-api-browser-procs.tcl
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
Source code: set _aa_export {} set body_count 1 foreach testcase_body {{ set bogus_value [ad_generate_random_string] set proc_value [apidoc::tclcode_to_html $bogus_value] aa_true "Bogus value returns itself ('$proc_value' eq '$bogus_value')" {$proc_value eq $bogus_value} aa_log "Fetching a few commands to test..." set commands [list] foreach command [info commands] { # Skip XOTcl methods if {[namespace which ::xotcl::Object] ne "" && [::xotcl::Object isobject [lindex $command 0]]} { continue } # Skip some corner-case command names created by the platform... is # this a bug or not? if {![regexp {(template_tag_listfilters|AcsSc\.|validator1\.|!|^_[^ ]|^\d+)} $command]} { lappend commands $command } if {[llength $commands] >= 50} { break } } if {[namespace which ::xotcl::Object] ne ""} { aa_log "Adding a few XOTcl classes" lappend commands {*}[lrange [::xotcl::Object info instances] 0 100] } foreach script $commands { set output [apidoc::tclcode_to_html $script] aa_true "Valid input '$script' returns some HTML" [ad_looks_like_html_p $output] aa_true "Valid input '$script' contains itself" {[string first $script $output] > -1} aa_true "Valid input '$script' contains some sort of URL of itself" {[string first [ns_quotehtml [ad_urldecode_query $script]] $output] > -1} } foreach script $commands { set output [apidoc::tcl_to_html $script] aa_true "Proc '$script' returns some HTML" [ad_looks_like_html_p $output] aa_true "Proc '$script' contains links to commands documentation" { [string first /api-doc/proc-view $output] > -1 || [string first /api-doc/tcl-proc $output] > -1 || [string first /xotcl/show-object $output] > -1 } } aa_true "Specifying OO flags on non-OO commands is not harmful" {[apidoc::tclcode_to_html -scope [ad_generate_random_string] apidoc::tclcode_to_html] eq [apidoc::tclcode_to_html apidoc::tclcode_to_html]} aa_true "Specifying namespace works as expected" {[string first [ns_quotehtml [ad_urldecode_query apidoc::tclcode_to_html]] [apidoc::tclcode_to_html -proc_namespace apidoc tclcode_to_html]] > -1} }} { aa_log "Running testcase body $body_count" set ::__aa_test_indent [info level] set catch_val [catch $testcase_body msg] if {$catch_val != 0 && $catch_val != 2} { aa_log_result "fail" "acs_api_browser_apidoc_tclcode_to_html (body $body_count): Error during execution: $msg, stack trace: \n$::errorInfo" } incr body_count }XQL Not present: Generic, PostgreSQL, Oracle