1 Return-Path: <novalazy@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 4BD5C429E2E
\r
6 for <notmuch@notmuchmail.org>; Fri, 21 Jun 2013 22:48:59 -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 Msd29P86WspV for <notmuch@notmuchmail.org>;
\r
17 Fri, 21 Jun 2013 22:48:53 -0700 (PDT)
\r
18 Received: from mail-pa0-f47.google.com (mail-pa0-f47.google.com
\r
19 [209.85.220.47]) (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 8A4CB431FBD
\r
22 for <notmuch@notmuchmail.org>; Fri, 21 Jun 2013 22:47:57 -0700 (PDT)
\r
23 Received: by mail-pa0-f47.google.com with SMTP id kl14so8705376pab.6
\r
24 for <notmuch@notmuchmail.org>; Fri, 21 Jun 2013 22:47:56 -0700 (PDT)
\r
25 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
\r
26 h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references;
\r
27 bh=YPwR379/zV05Okgh5XP41HNIKRY8a0jyAtZZVJLMf7E=;
\r
28 b=bwMw+8l1yLM6PQVQZj2YW2a6pvms3XB3DDSujVdhLVprJ6fYLMg2AQFjq5+w/GfZyj
\r
29 R+0e4PwxNK/vlo0nGJ0pXq0J/aKdeNBC33WEuzxg5iUxW2yuypUuJhDfpJuJSgSPrIPK
\r
30 zzmbG4Hq1qS9o24eZtwm+gslJ9O6MpNsfMaDwztqxDE5iKLdc16iNJb6O7XMcrRIRFKZ
\r
31 ow35h++6QhThGXJi3UZKDPjVUqj3fSMsbzO3qWq/CiyZrppFB6bDfJfEQ1stqx8QxlNt
\r
32 ga8A89zxO+xmcwJFLL1AVJVuWoOXsy2pp3Oe0dTOWgcqv+fyRqoVgL8nfim4MUfjh/zj
\r
34 X-Received: by 10.66.149.170 with SMTP id ub10mr19105634pab.206.1371880076775;
\r
35 Fri, 21 Jun 2013 22:47:56 -0700 (PDT)
\r
36 Received: from localhost (215.42.233.220.static.exetel.com.au.
\r
38 by mx.google.com with ESMTPSA id yj2sm7851931pbb.40.2013.06.21.22.47.54
\r
39 for <multiple recipients>
\r
40 (version=TLSv1.2 cipher=RC4-SHA bits=128/128);
\r
41 Fri, 21 Jun 2013 22:47:56 -0700 (PDT)
\r
42 From: Peter Wang <novalazy@gmail.com>
\r
43 To: notmuch@notmuchmail.org
\r
44 Subject: [PATCH v6 12/12] test: test insert --create-folder option
\r
45 Date: Sat, 22 Jun 2013 15:46:48 +1000
\r
46 Message-Id: <1371880008-18312-13-git-send-email-novalazy@gmail.com>
\r
47 X-Mailer: git-send-email 1.7.12.1
\r
48 In-Reply-To: <1371880008-18312-1-git-send-email-novalazy@gmail.com>
\r
49 References: <1371880008-18312-1-git-send-email-novalazy@gmail.com>
\r
50 X-BeenThere: notmuch@notmuchmail.org
\r
51 X-Mailman-Version: 2.1.13
\r
53 List-Id: "Use and development of the notmuch mail system."
\r
54 <notmuch.notmuchmail.org>
\r
55 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
56 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
57 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
58 List-Post: <mailto:notmuch@notmuchmail.org>
\r
59 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
60 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
61 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
62 X-List-Received-Date: Sat, 22 Jun 2013 05:48:59 -0000
\r
64 Add tests for notmuch insert --create-folder option.
\r
66 test/insert | 24 ++++++++++++++++++++++++
\r
67 1 file changed, 24 insertions(+)
\r
69 diff --git a/test/insert b/test/insert
\r
70 index f573c76..021edb6 100755
\r
73 @@ -94,4 +94,28 @@ gen_insert_msg
\r
74 test_expect_code 1 "Insert message into non-existent folder" \
\r
75 "notmuch insert --folder=nonesuch < $gen_msg_filename"
\r
77 +test_begin_subtest "Insert message, create folder"
\r
79 +notmuch insert --folder=F --create-folder +folder < "$gen_msg_filename"
\r
80 +output=$(notmuch search --output=files folder:F tag:folder)
\r
81 +basename=$(basename "$output")
\r
82 +test_expect_equal_file "$gen_msg_filename" "$MAIL_DIR/F/cur/${basename}"
\r
84 +test_begin_subtest "Insert message, create subfolder"
\r
86 +notmuch insert --folder=F/G/H/I/J --create-folder +folder < "$gen_msg_filename"
\r
87 +output=$(notmuch search --output=files folder:F/G/H/I/J tag:folder)
\r
88 +basename=$(basename "$output")
\r
89 +test_expect_equal_file "$gen_msg_filename" "${MAIL_DIR}/F/G/H/I/J/cur/${basename}"
\r
91 +test_begin_subtest "Insert message, create existing subfolder"
\r
93 +notmuch insert --folder=F/G/H/I/J --create-folder +folder < "$gen_msg_filename"
\r
94 +output=$(notmuch count folder:F/G/H/I/J tag:folder)
\r
95 +test_expect_equal "$output" "2"
\r
98 +test_expect_code 1 "Insert message, create invalid subfolder" \
\r
99 + "notmuch insert --folder=../G --create-folder $gen_msg_filename"
\r