1 Return-Path: <dmitry.kurochkin@gmail.com>
\r
2 X-Original-To: notmuch@notmuchmail.org
\r
3 Delivered-To: notmuch@notmuchmail.org
\r
4 Received: from localhost (localhost [127.0.0.1])
\r
5 by olra.theworths.org (Postfix) with ESMTP id CC82C429E31
\r
6 for <notmuch@notmuchmail.org>; Mon, 9 May 2011 20:31:03 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5
\r
12 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,
\r
13 FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled
\r
14 Received: from olra.theworths.org ([127.0.0.1])
\r
15 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
16 with ESMTP id g7NXj0GBrRTf for <notmuch@notmuchmail.org>;
\r
17 Mon, 9 May 2011 20:31:03 -0700 (PDT)
\r
18 Received: from mail-fx0-f53.google.com (mail-fx0-f53.google.com
\r
19 [209.85.161.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits))
\r
20 (No client certificate requested)
\r
21 by olra.theworths.org (Postfix) with ESMTPS id 66944429E35
\r
22 for <notmuch@notmuchmail.org>; Mon, 9 May 2011 20:31:01 -0700 (PDT)
\r
23 Received: by mail-fx0-f53.google.com with SMTP id 8so4348123fxm.26
\r
24 for <notmuch@notmuchmail.org>; Mon, 09 May 2011 20:31:01 -0700 (PDT)
\r
25 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
\r
26 h=domainkey-signature:from:to:cc:subject:date:message-id:x-mailer
\r
27 :in-reply-to:references;
\r
28 bh=hKqZ8G5yBQi0qu1999du8WonHX4n5Pergzn2xIAv0Yc=;
\r
29 b=m9LlIAmeH3zUWMaBk8HE5Tk7qs+S6QaeUux1J0bh6lMK57kK6pmN31ue7og7TUfuOF
\r
30 9Q00rYvSZp6O7vNPtWEQIkvFnaJL67lgIZKbGGODipuUZCGvdIQd8PAcXjWiKqLKJkq4
\r
31 qAW/H04X2LsMHiabFnlAnL9q/90nWGhxOMztI=
\r
32 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
\r
33 h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references;
\r
34 b=Px9s1Tb5DmdDBiUWj/n6GopQ8NtbjGbGtdwmxc80L0QjFWQLglpivMzHEDLSivAlj8
\r
35 v+nvvfJ0sEQT4UDK9mX/FSwxz/UzPC7jC2dLH33NhXvJlhvcLl1hnD5YcSBkEf9Ovvsd
\r
36 Nbe7kaqBobIOTrkGOrT/8n8/YgEbc/glwOu2I=
\r
37 Received: by 10.223.17.142 with SMTP id s14mr853218faa.145.1304998261111;
\r
38 Mon, 09 May 2011 20:31:01 -0700 (PDT)
\r
39 Received: from localhost ([91.144.186.21])
\r
40 by mx.google.com with ESMTPS id s17sm707046fau.13.2011.05.09.20.30.59
\r
41 (version=TLSv1/SSLv3 cipher=OTHER);
\r
42 Mon, 09 May 2011 20:31:00 -0700 (PDT)
\r
43 From: Dmitry Kurochkin <dmitry.kurochkin@gmail.com>
\r
44 To: Notmuch Mail <notmuch@notmuchmail.org>
\r
45 Subject: [PATCH 2/2] test: add test for saving attachments using
\r
46 notmuch-show-save-part
\r
47 Date: Tue, 10 May 2011 07:30:51 +0400
\r
48 Message-Id: <1304998251-28700-3-git-send-email-dmitry.kurochkin@gmail.com>
\r
49 X-Mailer: git-send-email 1.7.5.1
\r
50 In-Reply-To: <1304998251-28700-1-git-send-email-dmitry.kurochkin@gmail.com>
\r
51 References: <1304998251-28700-1-git-send-email-dmitry.kurochkin@gmail.com>
\r
52 X-BeenThere: notmuch@notmuchmail.org
\r
53 X-Mailman-Version: 2.1.13
\r
55 List-Id: "Use and development of the notmuch mail system."
\r
56 <notmuch.notmuchmail.org>
\r
57 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
58 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
59 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
60 List-Post: <mailto:notmuch@notmuchmail.org>
\r
61 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
62 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
63 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
64 X-List-Received-Date: Tue, 10 May 2011 03:31:03 -0000
\r
66 Use .gz filenames for saved attachments in the tests to check
\r
67 that Emacs does not re-compress the file.
\r
69 Use test_expect_equal_file instead of test_expect_equal to avoid
\r
70 binary output on the console.
\r
72 test/emacs | 14 +++++++++-----
\r
73 1 files changed, 9 insertions(+), 5 deletions(-)
\r
75 diff --git a/test/emacs b/test/emacs
\r
76 index 75dec89..b376033 100755
\r
79 @@ -112,11 +112,15 @@ Fcc: $(pwd)/mail/sent
\r
80 On Fri, 29 Mar 1974 10:00:00 -0000, Notmuch Test Suite <test_suite@notmuchmail.org> wrote:
\r
81 > This is a test that messages are sent via SMTP"
\r
83 -test_begin_subtest "Save attachment from within emacs"
\r
84 -echo "./attachment" | test_emacs '(notmuch-show "id:cf0c4d610911171136h1713aa59w9cf9aa31f052ad0a@mail.gmail.com") (notmuch-show-save-attachments)' > /dev/null 2>&1
\r
85 -output=$(cat attachment)
\r
86 -expected=$(cat $EXPECTED/attachment)
\r
87 -test_expect_equal "$output" "$expected"
\r
88 +test_begin_subtest "Save attachment from within emacs using notmuch-show-save-attachments"
\r
89 +# save as archive to test that Emacs does not re-compress .gz
\r
90 +echo ./attachment1.gz | test_emacs '(notmuch-show "id:cf0c4d610911171136h1713aa59w9cf9aa31f052ad0a@mail.gmail.com") (notmuch-show-save-attachments)' > /dev/null 2>&1
\r
91 +test_expect_equal_file "$EXPECTED/attachment" attachment1.gz
\r
93 +test_begin_subtest "Save attachment from within emacs using notmuch-show-save-part"
\r
94 +# save as archive to test that Emacs does not re-compress .gz
\r
95 +echo ./attachment2.gz | test_emacs '(notmuch-show-save-part "id:cf0c4d610911171136h1713aa59w9cf9aa31f052ad0a@mail.gmail.com" 5)' > /dev/null 2>&1
\r
96 +test_expect_equal_file "$EXPECTED/attachment" attachment2.gz
\r
98 test_begin_subtest "View raw message within emacs"
\r
99 expected=$(cat $EXPECTED/raw-message-cf0c4d-52ad0a)
\r