_acs-lang__locale__test_lang_conn_browser_locale (private)

 _acs-lang__locale__test_lang_conn_browser_locale

Defined in packages/acs-lang/tcl/test/acs-lang-test-procs.tcl

Partial Call Graph (max 5 caller/called nodes):
%3 aa_log aa_log (public) aa_log_result aa_log_result (public) aa_run_with_teardown aa_run_with_teardown (public) lang::system::locale_set_enabled lang::system::locale_set_enabled (public) lang::test::assert_browser_locale lang::test::assert_browser_locale (private) _acs-lang__locale__test_lang_conn_browser_locale _acs-lang__locale__test_lang_conn_browser_locale _acs-lang__locale__test_lang_conn_browser_locale->aa_log _acs-lang__locale__test_lang_conn_browser_locale->aa_log_result _acs-lang__locale__test_lang_conn_browser_locale->aa_run_with_teardown _acs-lang__locale__test_lang_conn_browser_locale->lang::system::locale_set_enabled _acs-lang__locale__test_lang_conn_browser_locale->lang::test::assert_browser_locale

Testcases:
No testcase defined.
Source code:
        
        set _aa_export {}
        set body_count 1
        foreach testcase_body {{
    aa_run_with_teardown  -rollback  -test_code {

        # The tests assume that the danish locale is enabled
        lang::system::locale_set_enabled -locale "da_DK" -enabled t

        # First locale is perfect language match
        lang::test::assert_browser_locale "da,en-us;q=0.8,de;q=0.5,es;q=0.3" "da_DK"

        # First locale is perfect locale match
        lang::test::assert_browser_locale "da_DK,en-us;q=0.8,de;q=0.5,es;q=0.3" "da_DK"

        # Tentative match being discarded
        lang::test::assert_browser_locale "da_BLA,foobar,en" "en_US"

        # Tentative match being used
        lang::test::assert_browser_locale "da_BLA,foobar" "da_DK"

        # Several tentative matches, all being discarded
        lang::test::assert_browser_locale "da_BLA,foobar,da_BLUB,da_DK" "da_DK"
    }
}} {
          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" "locale__test_lang_conn_browser_locale (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: