[PATCH v3 1/4] test: add test for both adding and removing a tag at the same time
authorJani Nikula <jani@nikula.org>
Mon, 26 Mar 2012 21:04:08 +0000 (00:04 +0300)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:45:46 +0000 (09:45 -0800)
11/aefdb308297339126ce634cc15fba0dee0f432 [new file with mode: 0644]

diff --git a/11/aefdb308297339126ce634cc15fba0dee0f432 b/11/aefdb308297339126ce634cc15fba0dee0f432
new file mode 100644 (file)
index 0000000..47149fc
--- /dev/null
@@ -0,0 +1,98 @@
+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 F3036431FC0\r
+       for <notmuch@notmuchmail.org>; Mon, 26 Mar 2012 14:04:20 -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 h4x9IKWLC4QI for <notmuch@notmuchmail.org>;\r
+       Mon, 26 Mar 2012 14:04:20 -0700 (PDT)\r
+Received: from mail-lpp01m010-f53.google.com (mail-lpp01m010-f53.google.com\r
+       [209.85.215.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id B9B37431FAF\r
+       for <notmuch@notmuchmail.org>; Mon, 26 Mar 2012 14:04:19 -0700 (PDT)\r
+Received: by mail-lpp01m010-f53.google.com with SMTP id c1so4613102lah.26\r
+       for <notmuch@notmuchmail.org>; Mon, 26 Mar 2012 14:04:19 -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=gFin9Am7ETGh0Ga2ek/yQtonq/pnoQhmIgKqNG/DH34=;\r
+       b=aPEtp1Uixov1JISX7xBelhyg+HQiOjUI5UjVnR0z0aklyDqIKm8DUP/f0WOCHRd7wm\r
+       4co2eMOY5twqyKCI/mDh4D5YvMpem/cFc67IIC2fN/DeeMBpAL5sOIPqaf/8gVE84b7o\r
+       qlDiJlgI0/sNvqt1G0OJVHTKHPTI771qXs2/sH3g8gK1xqvo4e3T8FXQFeAqFA7X3zmS\r
+       s7/pcArB2xIg8eA+7XrNPXD4E9lank4dxc4S8F94QPWPxSKI8o9iTTPCTPLXdOQ9k5m6\r
+       nQCOqdYZDx1waALxTB5LHpSFnUliUk6NPV1zuJciJKEckvPWRohgNmgc2g8RLnRG6bks\r
+       3HEw==\r
+Received: by 10.152.111.161 with SMTP id ij1mr16971845lab.19.1332795859297;\r
+       Mon, 26 Mar 2012 14:04:19 -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 c3sm10784847lbg.6.2012.03.26.14.04.17\r
+       (version=SSLv3 cipher=OTHER); Mon, 26 Mar 2012 14:04:18 -0700 (PDT)\r
+From: Jani Nikula <jani@nikula.org>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH v3 1/4] test: add test for both adding and removing a tag at\r
+       the same time\r
+Date: Tue, 27 Mar 2012 00:04:08 +0300\r
+Message-Id:\r
+ <237b0c8e1deddea04aea30ced61c895ee4b1013c.1332795415.git.jani@nikula.org>\r
+X-Mailer: git-send-email 1.7.5.4\r
+In-Reply-To: <cover.1332795415.git.jani@nikula.org>\r
+References: <cover.1332795415.git.jani@nikula.org>\r
+In-Reply-To: <cover.1332795415.git.jani@nikula.org>\r
+References: <cover.1332795415.git.jani@nikula.org>\r
+X-Gm-Message-State:\r
+ ALoCoQk9rCht9egEs9dRv7Qr0phc7RhogvDl4ttwCQrjfZvzzC0iJOKMua3dFl+GlNpR6SqiH7IX\r
+Cc: tomi.ollila@iki.fi\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: Mon, 26 Mar 2012 21:04:21 -0000\r
+\r
+The current behaviour is that regardless of the order in which the\r
+addition and removal of a tag are specified, the tag is added.\r
+\r
+Signed-off-by: Jani Nikula <jani@nikula.org>\r
+---\r
+ test/tagging |    8 ++++++++\r
+ 1 files changed, 8 insertions(+), 0 deletions(-)\r
+\r
+diff --git a/test/tagging b/test/tagging\r
+index 77202bf..3acf1bc 100755\r
+--- a/test/tagging\r
++++ b/test/tagging\r
+@@ -38,4 +38,12 @@ 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 unread)"\r
+ \r
++test_begin_subtest "Tagging order"\r
++notmuch tag +tag4 -tag4 One\r
++notmuch tag -tag4 +tag4 Two\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 tag1 tag4 unread)\r
++thread:XXX   2001-01-05 [1/1] Notmuch Test Suite; Two (inbox tag1 tag4 unread)"\r
++\r
+ test_done\r
+-- \r
+1.7.5.4\r
+\r