From 7815e94c52d092701804521eee850ac35d7f7781 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20Knau=C3=9F?= Date: Thu, 14 Jul 2016 18:36:02 +0200 Subject: updated --- framework/domain/mimetreeparser/test.cpp | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) (limited to 'framework/domain/mimetreeparser/test.cpp') diff --git a/framework/domain/mimetreeparser/test.cpp b/framework/domain/mimetreeparser/test.cpp index e096ea78..51aa9871 100644 --- a/framework/domain/mimetreeparser/test.cpp +++ b/framework/domain/mimetreeparser/test.cpp @@ -23,24 +23,27 @@ ap1 == getPart("cid:12345678") (Html) == cp1.availableContent() # alternative msg + attachment -* ContentPart(html="HTML", plaintext="Text") => cp1 +* ContentPart(html=[TextPart("HTML"),], plaintext=[TextPart("Text"),]) => cp1 * AttachmentPart => ap1 (cp1) == collect(select=NoEncapsulatedMessages) (ap1) == collect(select=NoEncapsulatedMessages) (Html, PlainText) == cp1.availableContent() -"HTML" == cp1.content(Html) -"text" == cp1.content(Plaintext) +[TextPart("HTML"),] == cp1.content(Html) +[TextPart("Text"),] == cp1.content(Plaintext) -# alternative msg with GPGInline -* ContentPart(html="HTML", plaintext="Text cypted") => cp1 - * TextPart(text="Text") - * TextPart(text=foo, encryption=(enc1) +# alternative msg with GPGInlin +* ContentPart( + plaintext=[TextPart("Text"), TextPart("foo", encryption=(enc1))], + html=[TextPart("HTML"),] + ) => cp1 (Html, PlainText) == cp1.availableContent() -TODO: but how to get plaintext/html content? +[TextPart("HTML"),] == cp1.content(Html) +[TextPart("Text"),TextPart("foo", encryption=(enc1))] == cp1.content(Plaintext) + # encrypted msg (not encrypted/error) with unencrypted attachment * EncryptionErrorPart => cp1 @@ -59,16 +62,15 @@ TODO: but how to get plaintext/html content? (ap1, ap2) == collect(select=NoEncapsulatedMessages) #INLINE GPG encrypted msg + attachment -* ContentPart => cp1 - * TextPart - * TextPart(encrytion = (enc1(rec1,rec2),)) - * TextPart(signed = (sig1,)) - * TextPart +* ContentPart => cp1 with + plaintext=[TextPart, TextPart(encrytion = (enc1(rec1,rec2),)), TextPart(signed = (sig1,)), TextPart] * AttachmentPart => ap1 (cp1) == collect(select=NoEncapsulatedMessages) (ap1) == collect(select=NoEncapsulatedMessages) +[TextPart, TextPart(encrytion = (enc1(rec1,rec2),)), TextPart(signed = (sig1,)), TextPart] == cp1.content(Plaintext) + #forwared encrypted msg + attachments * ContentPart => cp1 * EncapsulatedPart => ep1 @@ -87,7 +89,7 @@ TODO: but how to get plaintext/html content? (ap1) = collect(ep1, select=NoEncapsulatedMessages) (cp1, cp2) == collect() -(ap1, ap2) == collect() +(ap1, ap2) == collect()[TextPart, TextPart(encrytion = (enc1(rec1,rec2),)), TextPart(signed = (sig1,)), TextPart] # plaintext msg + attachment + cert -- cgit v1.2.3