test/mime_test.cc
changeset 94 9ec29aa10b58
parent 89 aef5a4bc78f3
child 113 4bee48270834
     1.1 --- a/test/mime_test.cc	Sun Mar 08 12:18:20 2015 +0100
     1.2 +++ b/test/mime_test.cc	Mon Mar 09 23:20:08 2015 +0100
     1.3 @@ -22,8 +22,8 @@
     1.4      // testing multipart/alternative
     1.5  
     1.6      message *msg2 = new_message(PEP_dir_incoming,
     1.7 -            new_identity("vb@dingens.org", NULL, NULL, NULL),
     1.8 -            new_identity_list(new_identity("trischa@dingens.org", NULL, NULL, NULL)),
     1.9 +            new_identity("vb@dingens.org", NULL, NULL, "Volker Birk"),
    1.10 +            new_identity_list(new_identity("trischa@dingens.org", NULL, NULL, "Patricia Bädnar")),
    1.11              "my sübject");
    1.12      assert(msg2);
    1.13      string text2 = "my mèssage to yoü";
    1.14 @@ -44,6 +44,23 @@
    1.15      free(result2);
    1.16      free_message(msg2);
    1.17  
    1.18 +    cout << "opening mime_sample.txt for reading\n";
    1.19 +    ifstream inFile3 ("mime_sample.txt");
    1.20 +    assert(inFile3.is_open());
    1.21 +
    1.22 +    string mimetext3;
    1.23 +
    1.24 +    cout << "reading mime sample\n";
    1.25 +    while (!inFile3.eof()) {
    1.26 +        static string line;
    1.27 +        getline(inFile3, line);
    1.28 +        mimetext3 += line + "\n";
    1.29 +    }
    1.30 +    inFile3.close();
    1.31 +
    1.32 +    message *msg3;
    1.33 +    PEP_STATUS status3 = mime_decode_message(mimetext3.c_str(), &msg3);
    1.34 +
    1.35      cout << "calling release()\n";
    1.36      release(session);
    1.37      return 0;