_acs-tcl__ad_html_qualify_links (private)
_acs-tcl__ad_html_qualify_links
Defined in packages/acs-tcl/tcl/test/text-html-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_section "Testing without path" set rURL "relative/r.txt" set aURL "/dotlrn/clubs/club1/mytext.docx" set fqURL "https://openacs.org/doc/" set html [subst {<div><div class="table"> A relative URL <a href="$rURL">relative/r.txt</a> An absolute URL <a href="$aURL">mytext.docx</a> A fully qualified URL <a href="$fqURL">Documentation</a> }] set result [ad_html_qualify_links -location {http://myhost/} $html] aa_true "result contains relative URL NOT expanded" {[string match *href=\"$rURL* $result]} aa_true "result contains absolute URL location-prefixed" {[string match *http://myhost$aURL* $result]} aa_true "result contains fully qualified URL" {[string match *$fqURL* $result]} aa_section "Testing with path" set pretty_link "/dotlrn/clubs/club2/uploads/mytext.docx" set result [ad_html_qualify_links -location {http://myhost/} -path /somepath $html] aa_true "result contains relative URL expanded" {[string match */somepath/$rURL* $result]} aa_true "result contains absolute URL location-prefixed" {[string match *http://myhost$aURL* $result]} aa_true "result contains fully qualified URL" {[string match *$fqURL* $result]} }} { 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" "ad_html_qualify_links (body $body_count): Error during execution: $msg, stack trace: \n$::errorInfo" } incr body_count }XQL Not present: Generic, PostgreSQL, Oracle