Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id CE77C431FC0 for ; Sun, 18 Nov 2012 12:06:30 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id TxSe+LBDb2Rv for ; Sun, 18 Nov 2012 12:06:29 -0800 (PST) Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34]) by olra.theworths.org (Postfix) with ESMTP id C5E53431FB6 for ; Sun, 18 Nov 2012 12:06:29 -0800 (PST) Received: by guru.guru-group.fi (Postfix, from userid 501) id AE684100148; Sun, 18 Nov 2012 22:06:27 +0200 (EET) From: Tomi Ollila To: notmuch@notmuchmail.org Subject: [PATCH 1/2] test/emacs: test saving of attachment containing 8bit octets Date: Sun, 18 Nov 2012 22:06:24 +0200 Message-Id: <1353269185-23210-1-git-send-email-tomi.ollila@iki.fi> X-Mailer: git-send-email 1.8.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: tomi.ollila@iki.fi X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Nov 2012 20:06:31 -0000 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. --- test/emacs | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/test/emacs b/test/emacs index 77265b0..c8db7d0 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) -- 1.8.0