_ref-language__ref_language__set_data (private)

 _ref-language__ref_language__set_data

Defined in packages/ref-language/tcl/test/ref-language-procs.tcl

Partial Call Graph (max 5 caller/called nodes):
%3 aa_equals aa_equals (public) aa_error aa_error (public) aa_log aa_log (public) aa_log_result aa_log_result (public) aa_run_with_teardown aa_run_with_teardown (public) _ref-language__ref_language__set_data _ref-language__ref_language__set_data _ref-language__ref_language__set_data->aa_equals _ref-language__ref_language__set_data->aa_error _ref-language__ref_language__set_data->aa_log _ref-language__ref_language__set_data->aa_log_result _ref-language__ref_language__set_data->aa_run_with_teardown

Testcases:
No testcase defined.
Source code:
        
        set _aa_export {}
        set body_count 1
        foreach testcase_body {{
    aa_run_with_teardown -rollback -test_code {
        #
        # Check if the language foo already exists.
        #
        if {[db_0or1row foo {
            select * from language_639_2_codes where iso_639_2='foo'
        }]} {
            aa_error "Language 'Foo' already exists in the database"
        } else {
            #
            # Create the new language 'foo'.
            #
            # As this is running in a transaction, it should be cleaned up
            # automatically.
            #
            ref_language::set_data -label Foo -iso2 foo
            #
            # Check if creation was successful.
            #
            aa_true "Language Foo created" "[db_0or1row foo {
                select * from language_639_2_codes where iso_639_2='foo'
            }]"
            #
            # Try to modify it
            #
            ref_language::set_data -label Bar -iso2 foo -iso1 fo
            #
            # Check if modification was successful.
            #
            set iso_639_2 ""
            set iso_639_1 ""
            set label ""
            db_0or1row foo {
                select * from language_639_2_codes where iso_639_2='foo'
            }
            aa_equals "iso_639_2 should be foo" "$iso_639_2" "foo"
            aa_equals "iso_639_1 should be foo" "$iso_639_1" "fo"
            aa_equals "label should be Bar"     "$label"     "Bar"
        }
    }
}} {
          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" "ref_language__set_data (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: