aboutsummaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorGravatar Tomi Ollila <tomi.ollila@iki.fi>2012-11-18 22:06:24 +0200
committerGravatar David Bremner <bremner@debian.org>2012-11-26 21:58:15 -0400
commit0c4dea4e48c4b8c7f9e7a4a19e983b3c0ca81be3 (patch)
treecb2db7eb57d56dd08cce1334f6c48d018dc7cdab /test
parent610f0e09929a5f351f7c1c3850ac7e0d83ffe388 (diff)
test/emacs: test saving of attachment containing 8bit octets
This test catches the case 8bit octets in an attachment gets converted or lost when saving attachment to the file. This test is marked known broken.
Diffstat (limited to 'test')
-rwxr-xr-xtest/emacs27
1 files changed, 27 insertions, 0 deletions
diff --git a/test/emacs b/test/emacs
index 74155f8c..e01a6ff4 100755
--- a/test/emacs
+++ b/test/emacs
@@ -516,6 +516,33 @@ test_emacs '(let ((standard-input "\"attachment2.gz\""))
(notmuch-show-save-part "id:cf0c4d610911171136h1713aa59w9cf9aa31f052ad0a@mail.gmail.com" 5))'
test_expect_equal_file attachment2.gz "$EXPECTED/attachment"
+test_begin_subtest "Save 8bit attachment from within emacs using notmuch-show-save-attachments"
+test_subtest_known_broken
+
+add_message '[subject]="Attachment with 8bit chars"' \
+ '[header]="MIME-Version: 1.0"' \
+ '[content-type]="multipart/mixed; boundary=\"abcd\""' \
+ '[body]="--abcd
+Content-Type: text/plain
+
+Attachment follows:
+
+--abcd
+Content-Type: application/octet-stream; name=\"sample\"
+Content-Transfer-Encoding: 8bit
+Content-Disposition: attachment; filename=\"sample\"
+
+“¡ Hey ! It compiles ¡ Ship it !”
+
+--abcd--
+"'
+test_emacs '(notmuch-show "id:'"${gen_msg_id}"'")
+ (delete-file "OUTPUT")
+ (let ((standard-input "\"OUTPUT\""))
+ (notmuch-show-save-attachments))'
+
+test_expect_equal "$(cat OUTPUT)" '“¡ Hey ! It compiles ¡ Ship it !”'
+
test_begin_subtest "View raw message within emacs"
test_emacs '(notmuch-show "id:cf0c4d610911171136h1713aa59w9cf9aa31f052ad0a@mail.gmail.com")
(notmuch-show-view-raw-message)