From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id F3036431FC0 for ; Mon, 26 Mar 2012 14:04:20 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" X-Spam-Flag: NO X-Spam-Score: -0.7 X-Spam-Level: X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_LOW=-0.7] 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 h4x9IKWLC4QI for ; Mon, 26 Mar 2012 14:04:20 -0700 (PDT) Received: from mail-lpp01m010-f53.google.com (mail-lpp01m010-f53.google.com [209.85.215.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id B9B37431FAF for ; Mon, 26 Mar 2012 14:04:19 -0700 (PDT) Received: by mail-lpp01m010-f53.google.com with SMTP id c1so4613102lah.26 for ; Mon, 26 Mar 2012 14:04:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :in-reply-to:references:x-gm-message-state; bh=gFin9Am7ETGh0Ga2ek/yQtonq/pnoQhmIgKqNG/DH34=; b=aPEtp1Uixov1JISX7xBelhyg+HQiOjUI5UjVnR0z0aklyDqIKm8DUP/f0WOCHRd7wm 4co2eMOY5twqyKCI/mDh4D5YvMpem/cFc67IIC2fN/DeeMBpAL5sOIPqaf/8gVE84b7o qlDiJlgI0/sNvqt1G0OJVHTKHPTI771qXs2/sH3g8gK1xqvo4e3T8FXQFeAqFA7X3zmS s7/pcArB2xIg8eA+7XrNPXD4E9lank4dxc4S8F94QPWPxSKI8o9iTTPCTPLXdOQ9k5m6 nQCOqdYZDx1waALxTB5LHpSFnUliUk6NPV1zuJciJKEckvPWRohgNmgc2g8RLnRG6bks 3HEw== Received: by 10.152.111.161 with SMTP id ij1mr16971845lab.19.1332795859297; Mon, 26 Mar 2012 14:04:19 -0700 (PDT) Received: from localhost (dsl-hkibrasgw4-fe50f800-253.dhcp.inet.fi. [84.248.80.253]) by mx.google.com with ESMTPS id c3sm10784847lbg.6.2012.03.26.14.04.17 (version=SSLv3 cipher=OTHER); Mon, 26 Mar 2012 14:04:18 -0700 (PDT) From: Jani Nikula To: notmuch@notmuchmail.org Subject: [PATCH v3 1/4] test: add test for both adding and removing a tag at the same time Date: Tue, 27 Mar 2012 00:04:08 +0300 Message-Id: <237b0c8e1deddea04aea30ced61c895ee4b1013c.1332795415.git.jani@nikula.org> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: References: In-Reply-To: References: X-Gm-Message-State: ALoCoQk9rCht9egEs9dRv7Qr0phc7RhogvDl4ttwCQrjfZvzzC0iJOKMua3dFl+GlNpR6SqiH7IX Cc: tomi.ollila@iki.fi 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: Mon, 26 Mar 2012 21:04:21 -0000 The current behaviour is that regardless of the order in which the addition and removal of a tag are specified, the tag is added. Signed-off-by: Jani Nikula --- test/tagging | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/test/tagging b/test/tagging index 77202bf..3acf1bc 100755 --- a/test/tagging +++ b/test/tagging @@ -38,4 +38,12 @@ test_expect_equal "$output" "\ thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; One (:\" inbox tag1 unread) thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; Two (inbox tag1 unread)" +test_begin_subtest "Tagging order" +notmuch tag +tag4 -tag4 One +notmuch tag -tag4 +tag4 Two +output=$(notmuch search \* | notmuch_search_sanitize) +test_expect_equal "$output" "\ +thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; One (:\" inbox tag1 tag4 unread) +thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; Two (inbox tag1 tag4 unread)" + test_done -- 1.7.5.4