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 2D89F429E27 for ; Mon, 9 May 2011 18:24:47 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 1.7 X-Spam-Level: * X-Spam-Status: No, score=1.7 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, FREEMAIL_REPLY=2.499, 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 fzABzXj3Geml for ; Mon, 9 May 2011 18:24:46 -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 39060429E26 for ; Mon, 9 May 2011 18:24:46 -0700 (PDT) Received: by fxm8 with SMTP id 8so4302837fxm.26 for ; Mon, 09 May 2011 18:24:44 -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=EgBLAgshfdXltEArdVpD1u+X53chFtddWFVDJnUDhpI=; b=imtkDgpcB1/lyaSJdl0fOa3xkRSUCEVSnf/jgdnL9FukZcZtUiv32dYvtTsgOCb7Vj cN7tEaS5QrMqjvzSSzL0aAp4H1zO5SoUlBM5e0Pywv3fxu03iSszgd65bcwpMXccdbTB 4l5PAznpGqjki/KE2vxLIdpkc1gd/kMf8V2fk= 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=nC2ZpoRz5Iku3z27ofZZUpYW4mb4yhYuquGp8ErUTsyFrduIX20U0BtMqI0irn0qD5 5df/7pH4V8AdPENyayeyXvqhbxtt3GMjTsHAEBIGo4OF0Dp0un6B7Bg7EFoPnZTAZOuG 4QvyHx8vVyGDi6e7ed+HkMN1+8Dej5ix6Ncno= Received: by 10.223.59.81 with SMTP id k17mr366749fah.94.1304990684851; Mon, 09 May 2011 18:24:44 -0700 (PDT) Received: from localhost ([91.144.186.21]) by mx.google.com with ESMTPS id t15sm45904fau.0.2011.05.09.18.24.43 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 09 May 2011 18:24:44 -0700 (PDT) From: Dmitry Kurochkin To: Notmuch Mail Subject: [PATCH] test: saving attachments from within emacs using notmuch-show-save-part Date: Tue, 10 May 2011 05:24:49 +0400 Message-Id: <1304990689-10933-1-git-send-email-dmitry.kurochkin@gmail.com> X-Mailer: git-send-email 1.7.5.1 In-Reply-To: <1304990327-8665-1-git-send-email-dmitry.kurochkin@gmail.com> References: <1304990327-8665-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:24:47 -0000 --- Oops, the previos patch (id:"1304990327-8665-1-git-send-email-dmitry.kurochkin@gmail.com") has wrong title. s/notmuch-show-save-attachments/notmuch-show-save-part/ Regards, Dmitry 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