messagingfw/msgtest/integration/email/group/script/popCharsetTests.txt
changeset 62 db3f5fa34ec7
parent 0 8e480a14352b
equal deleted inserted replaced
60:9f5ae1728557 62:db3f5fa34ec7
       
     1 // ###########################################
       
     2 //  
       
     3 //  Author:	Santiago Rilova
       
     4 //  Date:	20/08/2003
       
     5 //
       
     6 //  This tests Sirocco PREQ98- Storing received mail messages.  User MUST be able to change the character set
       
     7 //                             without loosing data independently of original character set. 
       
     8 //  It downloads emails from a server, some of which have corrupted charset information. It then dumps the messages
       
     9 //  and compares the output against reference files to verify it is correct.
       
    10 //
       
    11 // Execution:
       
    12 // 1. Copy this file to c:\msgtest\emailsmoke
       
    13 //  and execute "t_email -testparams popCharsetTests"
       
    14 //
       
    15 //
       
    16 // Pre-requisites:
       
    17 // 1. The mail account specified in imap_service_MsgExchange must contain the required emails
       
    18 // 2. The PREQ98 feature must be activated in the IMCM.RSC file (edit IMCM.RSS to update flag store_8bit_body_text
       
    19 //    to value=1 and recompile the resource file)
       
    20 //   
       
    21 // ####################################################
       
    22 
       
    23 [main]
       
    24 email_client_test email
       
    25 
       
    26 // Perform the test steps.
       
    27 
       
    28 [email]
       
    29 pop3_client_test init_mail_folders
       
    30 pop3_client_test create_POP3_service
       
    31 pop3_client_test do_inbox_sync_service
       
    32 //pop3_client_test dump_mail_store
       
    33 pop3_client_test dump_body
       
    34 pop3_client_test verify_body_text
       
    35 pop3_client_test verify_attachment_names
       
    36 pop3_client_test verify_header_fields
       
    37 
       
    38 // Delete the mail folder
       
    39 [init_mail_folders]
       
    40 add_comment Clean message folder in C drive
       
    41 clean_message_folder
       
    42 add_comment Start client session
       
    43 start_client_session
       
    44 
       
    45 //
       
    46 // Create POP3 service
       
    47 // 
       
    48 [create_POP3_service]
       
    49 add_comment Create POP3 service for testing
       
    50 select_root_folder
       
    51 pop3_service pop3_service_MsgExchange
       
    52 select_folder test_pop3_service
       
    53 
       
    54 [do_inbox_sync_service]
       
    55 add_comment Do sync
       
    56 select_root_folder
       
    57 select_folder test_pop3_service
       
    58 set_sync_limits -1
       
    59 add_comment Connecting
       
    60 connect
       
    61 check_pop3_error 0
       
    62 add_comment *** Populate the Messages ***
       
    63 select_root_folder
       
    64 select_destination_folder test_pop3_service
       
    65 select_root_folder
       
    66 select_folder test_pop3_service
       
    67 select_all_messages
       
    68 copy
       
    69 check_pop3_error 0
       
    70 disconnect
       
    71 check_pop3_error 0
       
    72 
       
    73 [dump_mail_store]
       
    74 dump_mail_store dump1\
       
    75 
       
    76 [dump_body]
       
    77 add_comment Do sync
       
    78 select_root_folder
       
    79 select_folder test_pop3_service
       
    80 select_all_messages
       
    81 //
       
    82 //  Change to the correct charset
       
    83 //
       
    84 // change to gb2312, KCharacterSetIdentifierGb2312=0x10000fbe (=268439486)
       
    85 // Change to ISO 88591 KCharacterSetIdentifierIso88591=0x10003b10  (=268450576)
       
    86 //change_charset 268450576
       
    87 //
       
    88 //   Dump the bodies
       
    89 // 
       
    90 select_entry plain_text_non_mime
       
    91 dump_body_text plain_text_non_mime.txt
       
    92 change_charset 268450576
       
    93 dump_body_text plain_text_non_mime2.txt
       
    94 //
       
    95 select_entry test_plain_bodytext_no_encoding
       
    96 dump_body_text test_plain_bodytext_no_encoding.txt
       
    97 //
       
    98 select_entry corrupted_charset_test_plain_bodytext_no_encoding
       
    99 change_charset 268450576
       
   100 dump_body_text corrupted_charset_test_plain_bodytext_no_encoding.txt
       
   101 //
       
   102 select_entry test_plain_bodytext_with_attach_no_encoding
       
   103 dump_body_text test_plain_bodytext_with_attach_no_encoding.txt
       
   104 //
       
   105 select_entry corrupted_charset_test_plain_bodytext_with_attach_no_encoding
       
   106 change_charset 268450576
       
   107 dump_body_text corruptd_charset_test_plain_bodytext_with_attach_no_encoding.txt
       
   108 //
       
   109 select_entry test_plain_bodytext_qp_encoding
       
   110 dump_body_text test_plain_bodytext_qp_encoding.txt
       
   111 //
       
   112 // no need to change charset on this one because it has invalid charset info, so default charset (which is
       
   113 // the correct one, is used anyway)
       
   114 select_entry corrupted_charset_test_plain_bodytext_qp_encoding
       
   115 dump_body_text corrupted_charset_test_plain_bodytext_qp_encoding.txt
       
   116 //
       
   117 // lets try changing it anyway...should come up with the same output
       
   118 //
       
   119 select_entry corrupted_charset_test_plain_bodytext_qp_encoding
       
   120 dump_body_text corrupted_charset_test_plain_bodytext_qp_encoding2.txt
       
   121 //
       
   122 select_entry test_plain_bodytext_base64_encoding
       
   123 dump_body_text test_plain_bodytext_base64_encoding.txt
       
   124 //
       
   125 select_entry corrupted_charset_test_plain_bodytext_base64_encoding
       
   126 change_charset 268450576
       
   127 dump_body_text corrupted_charset_test_plain_bodytext_base64_encoding.txt
       
   128 //
       
   129 //
       
   130 select_entry html_no_encoding_with_attachments
       
   131 dump_body_text html_no_encoding_with_attachments.txt
       
   132 dump_attachment_names attachment_names3.txt
       
   133 //
       
   134 select_entry corrupted_charset_html_no_encoding_with_attachments
       
   135 change_charset 268450576
       
   136 dump_body_text corrupted_charset_html_no_encoding_with_attachments.txt
       
   137 dump_attachment_names attachment_names4.txt
       
   138 //
       
   139 select_entry html_base64_with_attachment
       
   140 dump_body_text html_base64_with_attachment.txt
       
   141 dump_attachment_names single_attachment_name.txt
       
   142 //
       
   143 select_entry corrupted_charset_html_base64_with_attachment
       
   144 change_charset 268450576
       
   145 dump_body_text corrupted_charset_html_base64_with_attachment.txt
       
   146 dump_attachment_names single_attachment_name2.txt
       
   147 //
       
   148 //
       
   149 select_entry html_qp_encoding_looking_french
       
   150 change_charset 268450576
       
   151 dump_body_text html_qp_encoding_bodytext.txt
       
   152 dump_header_fields html_qp_encoding_headers.txt
       
   153 //
       
   154 // Some more attachments....
       
   155 //
       
   156 select_entry test_attachment1
       
   157 dump_attachment_names attachment_names.txt
       
   158 //
       
   159 select_entry test_attachment1_corrupted
       
   160 change_charset 268450576
       
   161 dump_attachment_names attachment_names2.txt
       
   162 //
       
   163 //
       
   164 //
       
   165 
       
   166 [verify_body_text]
       
   167 compare_files plain_text_non_mime.txt plain_text_non_mime.txt
       
   168 compare_files plain_text_non_mime2.txt plain_text_non_mime.txt
       
   169 compare_files test_plain_bodytext_no_encoding.txt test_plain_bodytext_no_encoding.txt
       
   170 compare_files corrupted_charset_test_plain_bodytext_no_encoding.txt test_plain_bodytext_no_encoding.txt
       
   171 compare_files test_plain_bodytext_with_attach_no_encoding.txt tpop_bodytext_with_attachments.txt
       
   172 compare_files corruptd_charset_test_plain_bodytext_with_attach_no_encoding.txt tpop_bodytext_with_attachments.txt
       
   173 compare_files test_plain_bodytext_qp_encoding.txt test_plain_bodytext_qp_encoding.txt
       
   174 compare_files corrupted_charset_test_plain_bodytext_qp_encoding.txt test_plain_bodytext_qp_encoding.txt
       
   175 compare_files corrupted_charset_test_plain_bodytext_qp_encoding2.txt test_plain_bodytext_qp_encoding.txt
       
   176 compare_files test_plain_bodytext_base64_encoding.txt test_plain_bodytext_base64_encoding.txt
       
   177 compare_files corrupted_charset_test_plain_bodytext_base64_encoding.txt test_plain_bodytext_base64_encoding.txt
       
   178 compare_files html_no_encoding_with_attachments.txt tpop_bodytext_with_attachments.txt
       
   179 compare_files corrupted_charset_html_no_encoding_with_attachments.txt tpop_bodytext_with_attachments.txt
       
   180 compare_files html_base64_with_attachment.txt html_with_attachments_bodytext.txt
       
   181 compare_files corrupted_charset_html_base64_with_attachment.txt html_with_attachments_bodytext.txt
       
   182 compare_files html_qp_encoding_bodytext.txt pop_html_qp_encoding_bodytext.txt
       
   183 
       
   184 [verify_attachment_names]
       
   185 compare_files attachment_names.txt attachment_names.txt
       
   186 compare_files attachment_names2.txt attachment_names.txt
       
   187 compare_files attachment_names3.txt attachment_names.txt
       
   188 compare_files attachment_names4.txt attachment_names.txt
       
   189 compare_files single_attachment_name.txt single_attachment_name.txt
       
   190 compare_files single_attachment_name2.txt single_attachment_name.txt
       
   191 
       
   192 [verify_header_fields]
       
   193 compare_files html_qp_encoding_headers.txt pop_html_qp_encoding_headers.txt
       
   194 
       
   195 
       
   196 
       
   197 //
       
   198 // mail service definition
       
   199 //
       
   200 [pop3_service_MsgExchange]
       
   201 set_name test_pop3_service
       
   202 set_server lon-msgtest06.intra
       
   203 set_user santi
       
   204 set_pass password
       
   205 set_tls 0
       
   206 
       
   207