_acs-lang__util__convert_adp_variables_to_percentage_signs (private)
_acs-lang__util__convert_adp_variables_to_percentage_signs
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 adp_chunk "<property name=\"title\">@array.variable_name@ @variable_name2;noquote@ peter@collaboraid.biz</property>" set adp_chunk_converted [lang::util::convert_adp_variables_to_percentage_signs $adp_chunk] set adp_chunk_expected "<property name=\"title\">%array.variable_name% %variable_name2;noquote% peter@collaboraid.biz</property>" aa_equals "adp vars should be substituted with percentage sings" $adp_chunk_converted $adp_chunk_expected set adp_chunk_converted_back [lang::util::convert_percentage_signs_to_adp_variables $adp_chunk_converted] aa_equals "after having converted the text with percentage signs back to adp we should have what we started with" $adp_chunk_converted $adp_chunk_expected # Test that a string can start with adp vars set adp_chunk "@first_names.foobar;noquote@ @last_name@ peter@collaboraid.biz" set adp_chunk_converted [lang::util::convert_adp_variables_to_percentage_signs $adp_chunk] set adp_chunk_expected "%first_names.foobar;noquote% %last_name% peter@collaboraid.biz" aa_equals "adp vars should be substituted with percentage sings" $adp_chunk_converted $adp_chunk_expected set adp_chunk_converted_back [lang::util::convert_percentage_signs_to_adp_variables $adp_chunk_converted] aa_equals "after having converted the text with percentage signs back to adp we should have what we started with" $adp_chunk_converted $adp_chunk_expected set percentage_chunk {You are <a href="%role.character_url%">%role.character_title%</a> (%role.role_pretty%)} set percentage_chunk_converted [lang::util::convert_percentage_signs_to_adp_variables $percentage_chunk] set percentage_chunk_expected {You are <a href="@role.character_url@">@role.character_title@</a> (@role.role_pretty@)} aa_equals "converting percentage vars to adp vars" $percentage_chunk_converted $percentage_chunk_expected }} { 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__convert_adp_variables_to_percentage_signs (body $body_count): Error during execution: $msg, stack trace: \n$::errorInfo" } incr body_count }XQL Not present: Generic, PostgreSQL, Oracle