_acs-tcl__ad_js_escape (private)

 _acs-tcl__ad_js_escape

Defined in packages/acs-tcl/tcl/test/text-html-procs.tcl

Partial Call Graph (max 5 caller/called nodes):
%3 aa_log aa_log (public) aa_log_result aa_log_result (public) aa_true aa_true (public) ad_js_escape ad_js_escape (public) _acs-tcl__ad_js_escape _acs-tcl__ad_js_escape _acs-tcl__ad_js_escape->aa_log _acs-tcl__ad_js_escape->aa_log_result _acs-tcl__ad_js_escape->aa_true _acs-tcl__ad_js_escape->ad_js_escape

Testcases:
No testcase defined.
Source code:
        
        set _aa_export {}
        set body_count 1
        foreach testcase_body {{
    set string "\"\"\"\"\"\'"
    aa_true " - String of only quotes " {[ad_js_escape $string] eq {\"\"\"\"\"\'}}

    set string   "\n\r\t  \n\n\n \t\t \b \v\v\v  \f"
    set expected {\n\r\t  \n\n\n \t\t \b \v\v\v  \f}

    aa_true " - String of only escape sequences " {[ad_js_escape $string] eq $expected}

    set string   "\n\r\t  \na word  \'\n\n \t\"\" aaaaa\' \'\'\'\b \v\v\v  \f"
    set expected {\n\r\t  \na word  \'\n\n \t\"\" aaaaa\' \'\'\'\b \v\v\v  \f}

    ns_log notice EXP:<$expected>
    ns_log notice GOT:<[ad_js_escape $string]>

    aa_true " - String of escape sequences, quotes and text (with some quotes already escaped)"  {[ad_js_escape $string] eq $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" "ad_js_escape (body $body_count): Error during execution: $msg, stack trace: \n$::errorInfo"
          }
          incr body_count
        }
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: