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 0FEEA429E27 for ; Mon, 9 May 2011 18:18:38 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.799 X-Spam-Level: X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] 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 o9AyOeLZrHr8 for ; Mon, 9 May 2011 18:18:37 -0700 (PDT) Received: from mail-fx0-f53.google.com (mail-fx0-f53.google.com [209.85.161.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 6C1DC429E26 for ; Mon, 9 May 2011 18:18:37 -0700 (PDT) Received: by fxm8 with SMTP id 8so4300470fxm.26 for ; Mon, 09 May 2011 18:18:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references; bh=1CNOtz5TH+PbDx9Ux6vBxqVpXymv1EttnKAssr67atE=; b=NCvvEd+Qmu3CqWXzLGly+qDvCZ9lmWd7n+o0YY/owk+nNSENaQ19OK4X2CeQKEVe2Q G2BePNubwwoPABuwFt8ngFVday1TGWfsyuwGbjYaN20PZqyNLDH9lHyTUWgOi5/31j44 oN30FZLjtsU7fBvefFLHBcYYwNZ5/DK2hCvjk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; b=hGnuzotzDvcLg62WWanMBrJqtcXxLTTF0g0FWdTdrPMflDam3CUxOxftqZx+aw507g wF+DgyhtyGkdGpmuuAO18GgyIMMEOZ04nwnTONwCojFV0w97YcozONrnBmX43DfKbdT8 0bJdERs5MSxmwHq27uAeQtKKEGaaCw1eBHMvo= Received: by 10.223.68.193 with SMTP id w1mr4641844fai.42.1304990316126; Mon, 09 May 2011 18:18:36 -0700 (PDT) Received: from localhost ([91.144.186.21]) by mx.google.com with ESMTPS id d18sm2180993fak.22.2011.05.09.18.18.34 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 09 May 2011 18:18:35 -0700 (PDT) From: Dmitry Kurochkin To: Notmuch Mail Subject: [PATCH] test: saving attachments from within emacs using notmuch-show-save-attachments Date: Tue, 10 May 2011 05:18:47 +0400 Message-Id: <1304990327-8665-1-git-send-email-dmitry.kurochkin@gmail.com> X-Mailer: git-send-email 1.7.5.1 In-Reply-To: <1304984035-20743-1-git-send-email-dmitry.kurochkin@gmail.com> References: <1304984035-20743-1-git-send-email-dmitry.kurochkin@gmail.com> 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: Tue, 10 May 2011 01:18:38 -0000 --- test/emacs | 14 +++++++++++--- 1 files changed, 11 insertions(+), 3 deletions(-) diff --git a/test/emacs b/test/emacs index 75dec89..675a887 100755 --- a/test/emacs +++ b/test/emacs @@ -112,9 +112,17 @@ Fcc: $(pwd)/mail/sent On Fri, 29 Mar 1974 10:00:00 -0000, Notmuch Test Suite wrote: > This is a test that messages are sent via SMTP" -test_begin_subtest "Save attachment from within emacs" -echo "./attachment" | test_emacs '(notmuch-show "id:cf0c4d610911171136h1713aa59w9cf9aa31f052ad0a@mail.gmail.com") (notmuch-show-save-attachments)' > /dev/null 2>&1 -output=$(cat attachment) +test_begin_subtest "Save attachment from within emacs using notmuch-show-save-attachments" +# save as archive to test that Emacs does not re-compress .gz +echo "./attachment1.gz" | test_emacs '(notmuch-show "id:cf0c4d610911171136h1713aa59w9cf9aa31f052ad0a@mail.gmail.com") (notmuch-show-save-attachments)' > /dev/null 2>&1 +output=$(cat attachment1.gz) +expected=$(cat $EXPECTED/attachment) +test_expect_equal "$output" "$expected" + +test_begin_subtest "Save attachment from within emacs using notmuch-show-save-part" +# save as archive to test that Emacs does not re-compress .gz +echo "./attachment2.gz" | test_emacs '(notmuch-show-save-part "id:cf0c4d610911171136h1713aa59w9cf9aa31f052ad0a@mail.gmail.com" 5)' > /dev/null 2>&1 +output=$(cat attachment2.gz) expected=$(cat $EXPECTED/attachment) test_expect_equal "$output" "$expected" -- 1.7.5.1