_acs-lang__message__format (private)
_acs-lang__message__format
Defined in packages/acs-lang/tcl/test/acs-lang-test-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 localized_message "The %frog% jumped across the %fence%. About 50% of the time, he stumbled, or maybe it was %%20 %times%." set value_list {frog frog fence fence} aa_silence_log_entries -severities warning { set subst_message [lang::message::format $localized_message $value_list] } set expected_message "The frog jumped across the fence. About 50% of the time, he stumbled, or maybe it was %20 %times%." aa_equals "the frog should jump across the fence" $subst_message $expected_message set my_var(my_key) foo set localized_message "A text with an array variable %my_var.my_key% in it" set subst_message [lang::message::format $localized_message {} 1] set expected_message "A text with an array variable foo in it" aa_equals "embedded array variable" $subst_message $expected_message }} { 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" "message__format (body $body_count): Error during execution: $msg, stack trace: \n$::errorInfo" } incr body_count }XQL Not present: Generic, PostgreSQL, Oracle