_acs-tcl__util__split_and_join_location (private)
_acs-tcl__util__split_and_join_location
Defined in packages/acs-tcl/tcl/test/utilities-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 {{ foreach {location expected_proto expected_hostname expected_port expected_success} { aaa "" "" "" 0 http://miao.bau.com http miao.bau.com 80 1 aaa.bbb.ccc "" "" "" 0 https://website.at.domain https website.at.domain 443 1 http://another.website.com:666 http another.website.com 666 1 ftp:/ciao.broken.it "" "" "" 0 aaa.bbb.ccc/path "" "" "" 0 https://website.at.domain/afile https website.at.domain 443 1 http://another.website.com:666/andsomecontent http another.website.com 666 1 } { aa_silence_log_entries -severities warning { set success [util::split_location $location proto hostname port] } set expected_success_pretty [expr {$expected_success ? "succeeds" : "fails"}] aa_equals "Parsing '$location' $expected_success_pretty" $expected_success $success if {$expected_success} { aa_equals "Protocol for '$location' is '$expected_proto'" $expected_proto $proto aa_equals "Hostname for '$location' is '$expected_hostname'" $expected_hostname $hostname aa_equals "Port for '$location' is '$expected_port'" $expected_port $port aa_true "Joining back the parsing of '$location' returns the URL itself" [regexp {^[util::join_location -proto $proto -hostname $hostname -port $port].*$} $location] } } }} { 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__split_and_join_location (body $body_count): Error during execution: $msg, stack trace: \n$::errorInfo" } incr body_count }XQL Not present: Generic, PostgreSQL, Oracle