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 0A5C6429E3B for ; Fri, 2 May 2014 05:15:09 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 0.379 X-Spam-Level: X-Spam-Status: No, score=0.379 tagged_above=-999 required=5 tests=[NO_DNS_FOR_FROM=0.379] 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 vXhzWcWaXDOA for ; Fri, 2 May 2014 05:15:03 -0700 (PDT) Received: from disaster-area.hh.sledj.net (disaster-area.hh.sledj.net [81.149.164.25]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id B0D18429E32 for ; Fri, 2 May 2014 05:14:59 -0700 (PDT) Received: from hotblack-desiato.hh.sledj.net (hotblack-desiato.hh.sledj.net [172.16.100.105]) by disaster-area.hh.sledj.net (Postfix) with ESMTPSA id 13BA5501560; Fri, 2 May 2014 13:14:57 +0100 (BST) Received: by hotblack-desiato.hh.sledj.net (Postfix, from userid 30000) id B54E4103463; Fri, 2 May 2014 13:14:56 +0100 (BST) From: David Edmondson To: notmuch@notmuchmail.org Subject: [PATCH 5/5] Test: Add tests for "notmuch new" command line tags Date: Fri, 2 May 2014 13:14:47 +0100 Message-Id: <1399032887-25896-5-git-send-email-dme@dme.org> X-Mailer: git-send-email 1.9.2 In-Reply-To: References: 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: Fri, 02 May 2014 12:15:09 -0000 Add a simple set of tests for adding, removing and both adding and removing tags when running "notmuch new". --- test/T540-new-tags.sh | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100755 test/T540-new-tags.sh diff --git a/test/T540-new-tags.sh b/test/T540-new-tags.sh new file mode 100755 index 0000000..58e6c18 --- /dev/null +++ b/test/T540-new-tags.sh @@ -0,0 +1,28 @@ +#!/usr/bin/env bash +test_description="'notmuch new' with tags" +. ./test-lib.sh + +which notmuch + +test_begin_subtest "Add tags during new" +generate_message +notmuch new +happyfunball +flyfishing +output=$(notmuch search "id:${gen_msg_id}") +expected='thread:0000000000000001 2001-01-05 [1/1] Notmuch Test Suite; Add tags during new (flyfishing happyfunball inbox unread)' +test_expect_equal "$output" "$expected" + +test_begin_subtest "Remove tags during new" +generate_message +notmuch new -inbox +output=$(notmuch search "id:${gen_msg_id}") +expected='thread:0000000000000002 2001-01-05 [1/1] Notmuch Test Suite; Remove tags during new (unread)' +test_expect_equal "$output" "$expected" + +test_begin_subtest "Add and remove tags during new" +generate_message +notmuch new +happyfunball -inbox +output=$(notmuch search "id:${gen_msg_id}") +expected='thread:0000000000000003 2001-01-05 [1/1] Notmuch Test Suite; Add and remove tags during new (happyfunball unread)' +test_expect_equal "$output" "$expected" + +test_done -- 1.9.2