lang::test::check_import_result (private)
lang::test::check_import_result -package_key package_key \ -locale locale -upgrade_array upgrade_array -base_array base_array \ -db_array db_array -file_array file_array
Defined in packages/acs-lang/tcl/test/acs-lang-test-procs.tcl
This proc checks that the properties of messages in the database are what we expect after a message catalog import or upgrade.
- Switches:
- -package_key (required)
- -locale (required)
- -upgrade_array (required)
- -base_array (required)
- -db_array (required)
- -file_array (required)
- Author:
- Peter Marklund
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
Source code: upvar $upgrade_array upgrade_expect upvar $base_array base_messages upvar $db_array db_messages upvar $file_array file_messages # Check that we have the expected message properties in the database after upgrade foreach message_key [lsort [array names upgrade_expect]] { set expected_property $upgrade_expect($message_key) switch [dict get $expected_property message] { db { set expect_message $db_messages($message_key) } file { set expect_message $file_messages($message_key) } base { set expect_message $base_messages($message_key) } } unset -nocomplain message_actual lang::message::get -package_key $package_key -message_key $message_key -locale $locale -array message_actual # Check message properties aa_equals "Import check: $message_key - lang_messages.message" $message_actual(message) $expect_message aa_equals "Import check: $message_key - lang_messages.deleted_p" $message_actual(deleted_p) [dict get $expected_property deleted_p] aa_equals "Import check: $message_key - lang_messages.conflict_p" $message_actual(conflict_p) [dict get $expected_property conflict_p] aa_equals "Import check: $message_key - lang_messages.upgrade_status" $message_actual(upgrade_status) [dict get $expected_property upgrade_status] if {[dict get $expected_property sync_time] eq "not_null"} { aa_true "Import check: $message_key - lang_messages.sync_time not null" {$message_actual(sync_time) ne ""} } else { aa_true "Import check: $message_key - lang_messages.sync_time null" {$message_actual(sync_time) eq ""} } }XQL Not present: Generic, PostgreSQL, Oracle