diff options
Diffstat (limited to 'framework/domain/mimetreeparser/test.cpp')
-rw-r--r-- | framework/domain/mimetreeparser/test.cpp | 30 |
1 files changed, 16 insertions, 14 deletions
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") | |||
23 | (Html) == cp1.availableContent() | 23 | (Html) == cp1.availableContent() |
24 | 24 | ||
25 | # alternative msg + attachment | 25 | # alternative msg + attachment |
26 | * ContentPart(html="HTML", plaintext="Text") => cp1 | 26 | * ContentPart(html=[TextPart("HTML"),], plaintext=[TextPart("Text"),]) => cp1 |
27 | * AttachmentPart => ap1 | 27 | * AttachmentPart => ap1 |
28 | 28 | ||
29 | (cp1) == collect<ContentPart>(select=NoEncapsulatedMessages) | 29 | (cp1) == collect<ContentPart>(select=NoEncapsulatedMessages) |
30 | (ap1) == collect<AttachmentParts>(select=NoEncapsulatedMessages) | 30 | (ap1) == collect<AttachmentParts>(select=NoEncapsulatedMessages) |
31 | 31 | ||
32 | (Html, PlainText) == cp1.availableContent() | 32 | (Html, PlainText) == cp1.availableContent() |
33 | "HTML" == cp1.content(Html) | 33 | [TextPart("HTML"),] == cp1.content(Html) |
34 | "text" == cp1.content(Plaintext) | 34 | [TextPart("Text"),] == cp1.content(Plaintext) |
35 | 35 | ||
36 | # alternative msg with GPGInline | 36 | # alternative msg with GPGInlin |
37 | * ContentPart(html="HTML", plaintext="Text cypted<foo>") => cp1 | 37 | * ContentPart( |
38 | * TextPart(text="Text") | 38 | plaintext=[TextPart("Text"), TextPart("foo", encryption=(enc1))], |
39 | * TextPart(text=foo, encryption=(enc1) | 39 | html=[TextPart("HTML"),] |
40 | ) => cp1 | ||
40 | 41 | ||
41 | (Html, PlainText) == cp1.availableContent() | 42 | (Html, PlainText) == cp1.availableContent() |
42 | 43 | ||
43 | TODO: but how to get plaintext/html content? | 44 | [TextPart("HTML"),] == cp1.content(Html) |
45 | [TextPart("Text"),TextPart("foo", encryption=(enc1))] == cp1.content(Plaintext) | ||
46 | |||
44 | 47 | ||
45 | # encrypted msg (not encrypted/error) with unencrypted attachment | 48 | # encrypted msg (not encrypted/error) with unencrypted attachment |
46 | * EncryptionErrorPart => cp1 | 49 | * EncryptionErrorPart => cp1 |
@@ -59,16 +62,15 @@ TODO: but how to get plaintext/html content? | |||
59 | (ap1, ap2) == collect<AttachmentParts>(select=NoEncapsulatedMessages) | 62 | (ap1, ap2) == collect<AttachmentParts>(select=NoEncapsulatedMessages) |
60 | 63 | ||
61 | #INLINE GPG encrypted msg + attachment | 64 | #INLINE GPG encrypted msg + attachment |
62 | * ContentPart => cp1 | 65 | * ContentPart => cp1 with |
63 | * TextPart | 66 | plaintext=[TextPart, TextPart(encrytion = (enc1(rec1,rec2),)), TextPart(signed = (sig1,)), TextPart] |
64 | * TextPart(encrytion = (enc1(rec1,rec2),)) | ||
65 | * TextPart(signed = (sig1,)) | ||
66 | * TextPart | ||
67 | * AttachmentPart => ap1 | 67 | * AttachmentPart => ap1 |
68 | 68 | ||
69 | (cp1) == collect<ContentPart>(select=NoEncapsulatedMessages) | 69 | (cp1) == collect<ContentPart>(select=NoEncapsulatedMessages) |
70 | (ap1) == collect<AttachmentParts>(select=NoEncapsulatedMessages) | 70 | (ap1) == collect<AttachmentParts>(select=NoEncapsulatedMessages) |
71 | 71 | ||
72 | [TextPart, TextPart(encrytion = (enc1(rec1,rec2),)), TextPart(signed = (sig1,)), TextPart] == cp1.content(Plaintext) | ||
73 | |||
72 | #forwared encrypted msg + attachments | 74 | #forwared encrypted msg + attachments |
73 | * ContentPart => cp1 | 75 | * ContentPart => cp1 |
74 | * EncapsulatedPart => ep1 | 76 | * EncapsulatedPart => ep1 |
@@ -87,7 +89,7 @@ TODO: but how to get plaintext/html content? | |||
87 | (ap1) = collect<AttachmentParts>(ep1, select=NoEncapsulatedMessages) | 89 | (ap1) = collect<AttachmentParts>(ep1, select=NoEncapsulatedMessages) |
88 | 90 | ||
89 | (cp1, cp2) == collect<ContentPart>() | 91 | (cp1, cp2) == collect<ContentPart>() |
90 | (ap1, ap2) == collect<AttachmentParts>() | 92 | (ap1, ap2) == collect<AttachmentParts>()[TextPart, TextPart(encrytion = (enc1(rec1,rec2),)), TextPart(signed = (sig1,)), TextPart] |
91 | 93 | ||
92 | 94 | ||
93 | # plaintext msg + attachment + cert | 95 | # plaintext msg + attachment + cert |