--- /dev/null
+Return-Path: <jani@nikula.org>\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 3F38E421174\r
+ for <notmuch@notmuchmail.org>; Sat, 31 Mar 2012 15:18:13 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References"\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+ tests=[RCVD_IN_DNSWL_LOW=-0.7] 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 kFBv1WPrGnyw for <notmuch@notmuchmail.org>;\r
+ Sat, 31 Mar 2012 15:18:12 -0700 (PDT)\r
+Received: from mail-bk0-f53.google.com (mail-bk0-f53.google.com\r
+ [209.85.214.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+ (No client certificate requested)\r
+ by olra.theworths.org (Postfix) with ESMTPS id 1DCE5431FAF\r
+ for <notmuch@notmuchmail.org>; Sat, 31 Mar 2012 15:18:00 -0700 (PDT)\r
+Received: by mail-bk0-f53.google.com with SMTP id j4so1547751bkw.26\r
+ for <notmuch@notmuchmail.org>; Sat, 31 Mar 2012 15:18:00 -0700 (PDT)\r
+X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
+ d=google.com; s=20120113;\r
+ h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references\r
+ :in-reply-to:references:x-gm-message-state;\r
+ bh=GtjyHKr/UxYHD7sZ/r+atYDXmNHNVfTyGOiKe4jX80M=;\r
+ b=FimxayhTJ2NCrky/eZnub31zyH5TGUgV9Cd6f0wIZLLJCboWFgTmbY2yN6cBjtXLxM\r
+ oXOdc02HfSyrCwQUKzNjZypYHVMcAF20kGS/elcdfBdnJbIKyIE+KS+TpMPOoYbC2c+E\r
+ 6euVHqbddFY6BsqyG6QoMIfGGCkU6PoyWI38ZhWBtHE1b5FXx0/lr0PJTwRUqhrl522s\r
+ ObSyZoeyypWDIhGS/Oe2P85MsrJqxgw5Kxl9tbaWT43lgs3EOzmzRMwbGBzRr3VGZ0PC\r
+ d1E0QS7tl34ug7FF2MQhOleNaQN61jN6AeVncEV8mZRAms0xEsQTjFfPNzFR6L/sSlUD\r
+ Ca/Q==\r
+Received: by 10.205.132.73 with SMTP id ht9mr1430875bkc.46.1333232280673;\r
+ Sat, 31 Mar 2012 15:18:00 -0700 (PDT)\r
+Received: from localhost (dsl-hkibrasgw4-fe50f800-253.dhcp.inet.fi.\r
+ [84.248.80.253])\r
+ by mx.google.com with ESMTPS id z17sm28529565bkw.12.2012.03.31.15.17.58\r
+ (version=SSLv3 cipher=OTHER); Sat, 31 Mar 2012 15:17:59 -0700 (PDT)\r
+From: Jani Nikula <jani@nikula.org>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH 7/8] test: add test for notmuch tag --stdin option\r
+Date: Sun, 1 Apr 2012 01:17:27 +0300\r
+Message-Id:\r
+ <ddf442a6462536a54dfd4491fa7bdb89dac20ce0.1333231401.git.jani@nikula.org>\r
+X-Mailer: git-send-email 1.7.5.4\r
+In-Reply-To: <cover.1333231401.git.jani@nikula.org>\r
+References: <cover.1333231401.git.jani@nikula.org>\r
+In-Reply-To: <cover.1333231401.git.jani@nikula.org>\r
+References: <cover.1333231401.git.jani@nikula.org>\r
+X-Gm-Message-State:\r
+ ALoCoQmtru8hkIjcnN5KL6ZTMVqQ2K5csGB0shIWZuxBCqLQgWfPJlxxpsOx7vCtoLEYyIjAD3wL\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: Sat, 31 Mar 2012 22:18:13 -0000\r
+\r
+---\r
+ test/tagging | 13 +++++++++++++\r
+ 1 files changed, 13 insertions(+), 0 deletions(-)\r
+\r
+diff --git a/test/tagging b/test/tagging\r
+index e4782ed..15eb42d 100755\r
+--- a/test/tagging\r
++++ b/test/tagging\r
+@@ -46,4 +46,17 @@ test_expect_equal "$output" "\\r
+ thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; One (:\" inbox tag1 unread)\r
+ thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; Two (inbox tag1 tag4 unread)"\r
+ \r
++test_begin_subtest "Batch stdin"\r
++notmuch tag --stdin <<EOF\r
++# %20 is a space in tag\r
++T -:"%20 -tag1 +tag5 +tag6 -- One\r
++T +tag1 -tag1 -tag4 +tag4 -- Two\r
++T -tag6 One\r
++T +tag5 Two\r
++EOF\r
++output=$(notmuch search \* | notmuch_search_sanitize)\r
++test_expect_equal "$output" "\\r
++thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; One (inbox tag5 unread)\r
++thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; Two (inbox tag4 tag5 unread)"\r
++\r
+ test_done\r
+-- \r
+1.7.5.4\r
+\r