test/message_api_test.cc
changeset 48 9ff5d2dfa75a
parent 45 37a80387790d
child 51 761bc0b46b98
     1.1 --- a/test/message_api_test.cc	Mon Jan 26 13:11:40 2015 +0100
     1.2 +++ b/test/message_api_test.cc	Sun Feb 08 11:33:04 2015 -0500
     1.3 @@ -21,27 +21,26 @@
     1.4      assert(msg);
     1.5      cout << "message created.\n";
     1.6  
     1.7 -    cout << "encrypting message…\n";
     1.8 -    message *enc_msg;
     1.9 +//     cout << "encrypting message in pieces…\n";
    1.10 +//     message *enc_msg;
    1.11 +//     cout << "calling encrypt_message()\n";
    1.12 +//     PEP_STATUS status2 = encrypt_message(session, msg, NULL, &enc_msg, PEP_enc_pieces);
    1.13 +//     assert(status2 == PEP_STATUS_OK);
    1.14 +//     assert(enc_msg);
    1.15 +//     cout << "message encrypted.\n";
    1.16 +
    1.17 +    cout << "encrypting message as MIME multipart…\n";
    1.18 +    message *enc_msg2;
    1.19      cout << "calling encrypt_message()\n";
    1.20 -    PEP_STATUS status2 = encrypt_message(session, msg, NULL, &enc_msg, PEP_enc_pieces);
    1.21 -    assert(status2 == PEP_STATUS_OK);
    1.22 -    assert(enc_msg);
    1.23 +    PEP_STATUS status3 = encrypt_message(session, msg, NULL, &enc_msg2, PEP_enc_MIME_multipart);
    1.24 +    assert(status3 == PEP_STATUS_OK);
    1.25 +    assert(enc_msg2);
    1.26      cout << "message encrypted.\n";
    1.27 -
    1.28 -//     cout << "MIME encoding message…\n";
    1.29 -//     message *mmsg;
    1.30 -//     PEP_STATUS status3 = mime_encode_parts(msg, &mmsg);
    1.31 -//     assert(mmsg);
    1.32 -//     assert(status3 == PEP_STATUS_OK);
    1.33 -//     cout << "message:\n";
    1.34 -//     cout << mmsg->longmsg;
    1.35 -//     cout << "\n";
    1.36 -
    1.37 +    
    1.38      cout << "freeing messages…\n";
    1.39      free_message(msg);
    1.40 -    free_message(enc_msg);
    1.41 -//     free_message(mmsg);
    1.42 +//    free_message(enc_msg);
    1.43 +    free_message(enc_msg2);
    1.44      cout << "done.\n";
    1.45  
    1.46      cout << "calling release()\n";