--- /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 7A62D431FDA\r
+ for <notmuch@notmuchmail.org>; Sat, 14 Apr 2012 05:16:04 -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 yjYAsUHjjsRp for <notmuch@notmuchmail.org>;\r
+ Sat, 14 Apr 2012 05:16:03 -0700 (PDT)\r
+Received: from mail-lb0-f181.google.com (mail-lb0-f181.google.com\r
+ [209.85.217.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+ (No client certificate requested)\r
+ by olra.theworths.org (Postfix) with ESMTPS id C7890431FD8\r
+ for <notmuch@notmuchmail.org>; Sat, 14 Apr 2012 05:15:56 -0700 (PDT)\r
+Received: by mail-lb0-f181.google.com with SMTP id b5so40243lbd.26\r
+ for <notmuch@notmuchmail.org>; Sat, 14 Apr 2012 05:15:56 -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=G4nGjXPa+yb0hTY7/Vt4U3yl0yEsiG8+E+TgUuUtJbVt7Q/OOHsy7do8QXqe/euMx8\r
+ ncRCJ5OsP7eTXhTZI3hhq7OuajoNVtI2qLvuRI5D9r6QUM2qWLqKxaqKd1NbJYdh31DC\r
+ SfbqC2qy8/3PpIPMcN29lC9SY8KhWeX/cMGlp3WZ5QuSnt0eAgddT0r36oO5v5wTGvXV\r
+ 8M/JesNdcczE1LUyjUfstbZulb03DPRztzq/NWCFFjUvrj/lgVUMy+e2VsZJHpga9+kl\r
+ Qt2EkE7V27ocSDnS27kxzoLkOAx4g/6duvgjbQCFPGbjNkJOuuXctbVsG+/zUAd0GxzI\r
+ DdaQ==\r
+Received: by 10.112.27.233 with SMTP id w9mr573550lbg.21.1334405756435;\r
+ Sat, 14 Apr 2012 05:15:56 -0700 (PDT)\r
+Received: from localhost (dsl-hkibrasgw4-fe50dc00-68.dhcp.inet.fi.\r
+ [80.220.80.68])\r
+ by mx.google.com with ESMTPS id f4sm1448560lbk.15.2012.04.14.05.15.54\r
+ (version=SSLv3 cipher=OTHER); Sat, 14 Apr 2012 05:15:55 -0700 (PDT)\r
+From: Jani Nikula <jani@nikula.org>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH v2 5/6] test: add test for notmuch tag --stdin option\r
+Date: Sat, 14 Apr 2012 15:15:30 +0300\r
+Message-Id:\r
+ <6b9468f37983a6f5a185fadda4b2c4cbe9815aea.1334404979.git.jani@nikula.org>\r
+X-Mailer: git-send-email 1.7.5.4\r
+In-Reply-To: <cover.1334404979.git.jani@nikula.org>\r
+References: <cover.1334404979.git.jani@nikula.org>\r
+In-Reply-To: <cover.1334404979.git.jani@nikula.org>\r
+References: <cover.1334404979.git.jani@nikula.org>\r
+X-Gm-Message-State:\r
+ ALoCoQnGy/gdP70KhW+ut0tr7OqQkZteOYBkxpZvTj9mwbD6ESO0cxHEqzDMvLU3fKPtQPxEHj/K\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, 14 Apr 2012 12:16:05 -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