From 0067d33e04132a8919b6277b1cbca5e6f1fb2812 Mon Sep 17 00:00:00 2001 From: David Edmondson Date: Fri, 2 May 2014 09:15:55 +0100 Subject: [PATCH] [PATCH 5/5] Test: Add tests for "notmuch new" command line tags --- a3/3365269d262a30a4ec541801c0b26e1efb37ca | 94 +++++++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 a3/3365269d262a30a4ec541801c0b26e1efb37ca diff --git a/a3/3365269d262a30a4ec541801c0b26e1efb37ca b/a3/3365269d262a30a4ec541801c0b26e1efb37ca new file mode 100644 index 000000000..6bcecee30 --- /dev/null +++ b/a3/3365269d262a30a4ec541801c0b26e1efb37ca @@ -0,0 +1,94 @@ +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 57CDD431FBD + for ; Fri, 2 May 2014 01:23:28 -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 YfbTMvNz2Fs1 for ; + Fri, 2 May 2014 01:23:22 -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 91096431FC0 + for ; Fri, 2 May 2014 01:23:17 -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 32EF6501586; + Fri, 2 May 2014 09:16:12 +0100 (BST) +Received: by hotblack-desiato.hh.sledj.net (Postfix, from userid 30000) + id C879410345C; Fri, 2 May 2014 09:16:10 +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 09:15:55 +0100 +Message-Id: <1399018555-1994-6-git-send-email-dme@dme.org> +X-Mailer: git-send-email 1.9.2 +In-Reply-To: <1399018555-1994-1-git-send-email-dme@dme.org> +References: <1399018555-1994-1-git-send-email-dme@dme.org> +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 08:23:28 -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 + -- 2.26.2