summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSandro Knauß <[email protected]>2017-05-31 16:01:27 +0200
committerSandro Knauß <[email protected]>2017-06-01 18:34:38 +0200
commitcf0d5e9e94d2ef7f185b6e831a13f7299bde6f8c (patch)
tree0c828d8f4a48b5313b679b285381a298c53e6899
parentbc138231b5e9fc112f9ba6bb457cc780541f8ab5 (diff)
Test a not covered codepath in DefaultRenderer.
A PGP Block, that is no real block so we need to render as a normal Textblock.
-rw-r--r--mimetreeparser/autotests/data/inlinepgpencrypted-not-encrypted.mbox23
-rw-r--r--mimetreeparser/autotests/data/inlinepgpencrypted-not-encrypted.mbox.html21
-rw-r--r--mimetreeparser/autotests/data/inlinepgpencrypted-not-encrypted.mbox.tree3
-rw-r--r--mimetreeparser/autotests/data/openpgp-inline-signed-not-signed.mbox20
-rw-r--r--mimetreeparser/autotests/data/openpgp-inline-signed-not-signed.mbox.html22
-rw-r--r--mimetreeparser/autotests/data/openpgp-inline-signed-not-signed.mbox.tree3
6 files changed, 92 insertions, 0 deletions
diff --git a/mimetreeparser/autotests/data/inlinepgpencrypted-not-encrypted.mbox b/mimetreeparser/autotests/data/inlinepgpencrypted-not-encrypted.mbox
new file mode 100644
index 0000000..0e68fba
--- /dev/null
+++ b/mimetreeparser/autotests/data/inlinepgpencrypted-not-encrypted.mbox
@@ -0,0 +1,23 @@
+From [email protected] Wed, 25 May 2011 23:49:40 +0100
+From: OpenPGP Test <[email protected]>
+Subject: inlinepgpencrypted - no seckey
+Date: Wed, 25 May 2011 23:49:40 +0100
+Message-ID: <[email protected]>
+X-KMail-Transport: GMX
+X-KMail-Fcc: 28
+X-KMail-Drafts: 7
+X-KMail-Templates: 9
+User-Agent: KMail/4.6 beta5 (Linux/2.6.34.7-0.7-desktop; KDE/4.6.41; x86_64; git-0269848; 2011-04-19)
+MIME-Version: 1.0
+Content-Transfer-Encoding: 7Bit
+Content-Type: text/plain; charset="us-ascii"
+
+-----BEGIN PGP MESSAGE-----
+Version: GnuPG v2
+
+asdf
+asdf
+asdf
+
+-----END PGP MESSAGE-----
diff --git a/mimetreeparser/autotests/data/inlinepgpencrypted-not-encrypted.mbox.html b/mimetreeparser/autotests/data/inlinepgpencrypted-not-encrypted.mbox.html
new file mode 100644
index 0000000..2d56fcf
--- /dev/null
+++ b/mimetreeparser/autotests/data/inlinepgpencrypted-not-encrypted.mbox.html
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF8"?>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+ <body>
+ <div style="position: relative; word-wrap: break-word">
+ <a name="att"/>
+ <div id="attachmentDiv">
+ <div class="noquote">
+ <div dir="ltr">-----BEGIN PGP MESSAGE-----</div>
+ <div dir="ltr">Version: GnuPG v2</div>
+ <br/>
+ <div dir="ltr">asdf</div>
+ <div dir="ltr">asdf</div>
+ <div dir="ltr">asdf</div>
+ <br/>
+ <div dir="ltr">-----END PGP MESSAGE-----</div>
+ </div>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/mimetreeparser/autotests/data/inlinepgpencrypted-not-encrypted.mbox.tree b/mimetreeparser/autotests/data/inlinepgpencrypted-not-encrypted.mbox.tree
new file mode 100644
index 0000000..6680b8b
--- /dev/null
+++ b/mimetreeparser/autotests/data/inlinepgpencrypted-not-encrypted.mbox.tree
@@ -0,0 +1,3 @@
+ * MimeTreeParser::MessagePartList
+ * MimeTreeParser::TextMessagePart
+ * MimeTreeParser::EncryptedMessagePart
diff --git a/mimetreeparser/autotests/data/openpgp-inline-signed-not-signed.mbox b/mimetreeparser/autotests/data/openpgp-inline-signed-not-signed.mbox
new file mode 100644
index 0000000..1007304
--- /dev/null
+++ b/mimetreeparser/autotests/data/openpgp-inline-signed-not-signed.mbox
@@ -0,0 +1,20 @@
+From: test <[email protected]>
+Subject: test
+Date: Tue, 25 Aug 2015 16:47:10 +0200
+Message-ID: <[email protected]>
+X-KMail-Identity: 1428848833
+User-Agent: KMail/4.13.0.3 (Linux/4.1.0-rc5-siduction-amd64; KDE/4.14.3; x86_64; git-7c86098; 2015-08-23)
+MIME-Version: 1.0
+Content-Transfer-Encoding: quoted-printable
+Content-Type: text/plain; charset="iso-8859-1"
+
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA256
+
+ohno =F6=E4=FC
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v2
+
+no signature
+-----END PGP SIGNATURE-----
diff --git a/mimetreeparser/autotests/data/openpgp-inline-signed-not-signed.mbox.html b/mimetreeparser/autotests/data/openpgp-inline-signed-not-signed.mbox.html
new file mode 100644
index 0000000..2523d85
--- /dev/null
+++ b/mimetreeparser/autotests/data/openpgp-inline-signed-not-signed.mbox.html
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF8"?>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+ <body>
+ <div style="position: relative; word-wrap: break-word">
+ <a name="att"/>
+ <div id="attachmentDiv">
+ <div class="noquote">
+ <div dir="ltr">-----BEGIN PGP SIGNED MESSAGE-----</div>
+ <div dir="ltr">Hash: SHA256</div>
+ <br/>
+ <div dir="ltr">ohno öäü</div>
+ <div dir="ltr">-----BEGIN PGP SIGNATURE-----</div>
+ <div dir="ltr">Version: GnuPG v2</div>
+ <br/>
+ <div dir="ltr">no signature</div>
+ <div dir="ltr">-----END PGP SIGNATURE-----</div>
+ </div>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/mimetreeparser/autotests/data/openpgp-inline-signed-not-signed.mbox.tree b/mimetreeparser/autotests/data/openpgp-inline-signed-not-signed.mbox.tree
new file mode 100644
index 0000000..23e9988
--- /dev/null
+++ b/mimetreeparser/autotests/data/openpgp-inline-signed-not-signed.mbox.tree
@@ -0,0 +1,3 @@
+ * MimeTreeParser::MessagePartList
+ * MimeTreeParser::TextMessagePart
+ * MimeTreeParser::SignedMessagePart