--- /dev/null
+Return-Path: <dme@hotblack-desiato.hh.sledj.net>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by olra.theworths.org (Postfix) with ESMTP id 57CDD431FBD\r
+ for <notmuch@notmuchmail.org>; Fri, 2 May 2014 01:23:28 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0.379\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0.379 tagged_above=-999 required=5\r
+ tests=[NO_DNS_FOR_FROM=0.379] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+ by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id YfbTMvNz2Fs1 for <notmuch@notmuchmail.org>;\r
+ Fri, 2 May 2014 01:23:22 -0700 (PDT)\r
+Received: from disaster-area.hh.sledj.net (disaster-area.hh.sledj.net\r
+ [81.149.164.25])\r
+ (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))\r
+ (No client certificate requested)\r
+ by olra.theworths.org (Postfix) with ESMTPS id 91096431FC0\r
+ for <notmuch@notmuchmail.org>; Fri, 2 May 2014 01:23:17 -0700 (PDT)\r
+Received: from hotblack-desiato.hh.sledj.net (hotblack-desiato.hh.sledj.net\r
+ [172.16.100.105])\r
+ by disaster-area.hh.sledj.net (Postfix) with ESMTPSA id 32EF6501586;\r
+ Fri, 2 May 2014 09:16:12 +0100 (BST)\r
+Received: by hotblack-desiato.hh.sledj.net (Postfix, from userid 30000)\r
+ id C879410345C; Fri, 2 May 2014 09:16:10 +0100 (BST)\r
+From: David Edmondson <dme@dme.org>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH 5/5] Test: Add tests for "notmuch new" command line tags\r
+Date: Fri, 2 May 2014 09:15:55 +0100\r
+Message-Id: <1399018555-1994-6-git-send-email-dme@dme.org>\r
+X-Mailer: git-send-email 1.9.2\r
+In-Reply-To: <1399018555-1994-1-git-send-email-dme@dme.org>\r
+References: <1399018555-1994-1-git-send-email-dme@dme.org>\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Fri, 02 May 2014 08:23:28 -0000\r
+\r
+Add a simple set of tests for adding, removing and both adding and\r
+removing tags when running "notmuch new".\r
+---\r
+ test/T540-new-tags.sh | 28 ++++++++++++++++++++++++++++\r
+ 1 file changed, 28 insertions(+)\r
+ create mode 100755 test/T540-new-tags.sh\r
+\r
+diff --git a/test/T540-new-tags.sh b/test/T540-new-tags.sh\r
+new file mode 100755\r
+index 0000000..58e6c18\r
+--- /dev/null\r
++++ b/test/T540-new-tags.sh\r
+@@ -0,0 +1,28 @@\r
++#!/usr/bin/env bash\r
++test_description="'notmuch new' with tags"\r
++. ./test-lib.sh\r
++\r
++which notmuch\r
++\r
++test_begin_subtest "Add tags during new"\r
++generate_message\r
++notmuch new +happyfunball +flyfishing\r
++output=$(notmuch search "id:${gen_msg_id}")\r
++expected='thread:0000000000000001 2001-01-05 [1/1] Notmuch Test Suite; Add tags during new (flyfishing happyfunball inbox unread)'\r
++test_expect_equal "$output" "$expected"\r
++\r
++test_begin_subtest "Remove tags during new"\r
++generate_message\r
++notmuch new -inbox\r
++output=$(notmuch search "id:${gen_msg_id}")\r
++expected='thread:0000000000000002 2001-01-05 [1/1] Notmuch Test Suite; Remove tags during new (unread)'\r
++test_expect_equal "$output" "$expected"\r
++\r
++test_begin_subtest "Add and remove tags during new"\r
++generate_message\r
++notmuch new +happyfunball -inbox\r
++output=$(notmuch search "id:${gen_msg_id}")\r
++expected='thread:0000000000000003 2001-01-05 [1/1] Notmuch Test Suite; Add and remove tags during new (happyfunball unread)'\r
++test_expect_equal "$output" "$expected"\r
++\r
++test_done\r
+-- \r
+1.9.2\r
+\r