_acs-tcl__util_close_html_tags (private)
_acs-tcl__util_close_html_tags
Defined in packages/acs-tcl/tcl/test/html-conversion-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 {{ aa_equals "" [util_close_html_tags "<b>Foobar"] "<b>Foobar</b>" aa_equals "" [util_close_html_tags "<b>Foobar</b>"] "<b>Foobar</b>" aa_equals "" [util_close_html_tags "<b>Foobar</b> is <i>a very long word</i>"] "<b>Foobar</b> is <i>a very long word</i>" aa_equals "" [util_close_html_tags "<b>Foobar</b> is <i>a very long word</i>" 15] "<b>Foobar</b> is <i>a</i>" aa_equals "" [util_close_html_tags "<b>Foobar</b> is <i>a very long word</i>" 0 20 "..."] "<b>Foobar</b> is <i>a very</i>..." set result [util_close_html_tags "<div><b>Foobar</b> 'i' <i>and 'div' not closed"] aa_true [ns_quotehtml $result] {$result eq "<div><b>Foobar</b> 'i' <i>and 'div' not closed</i></div>"} # # wrong nesting of tags and unclosed tags # set text {1 <em> 2 <b> 3 <em> 4 </em> 5 <div> 6} set result [util_close_html_tags $text] aa_log "Input: <pre>[ns_quotehtml $text]</pre>" aa_log "Result: <pre>[ns_quotehtml $result]</pre>" if {[::acs::icanuse "ns_parsehtml"]} { aa_true "tags are closed:" {[string range $result end-14 end] eq "</div></b></em>"} } }} { 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" "util_close_html_tags (body $body_count): Error during execution: $msg, stack trace: \n$::errorInfo" } incr body_count }XQL Not present: Generic, PostgreSQL, Oracle