Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id E06E5429E36 for ; Wed, 14 Sep 2011 15:23:58 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.699 X-Spam-Level: X-Spam-Status: No, score=-0.699 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, 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 Zx3YshoKSj3Z for ; Wed, 14 Sep 2011 15:23:57 -0700 (PDT) Received: from mail-ww0-f45.google.com (mail-ww0-f45.google.com [74.125.82.45]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 0C205429E29 for ; Wed, 14 Sep 2011 15:23:55 -0700 (PDT) Received: by mail-ww0-f45.google.com with SMTP id 36so2235195wwi.2 for ; Wed, 14 Sep 2011 15:23:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=zVWcNjtmv/y7BIQUHx/1pFRt3xQ+Umr0N9NhkLPI2GQ=; b=rB9fzUlHjeDN5ZmgaFc0RsFNpnarT6XkBXwcVrC+M8y7aOEwP5d1hqHTMj3CHGcQBW 103MMjVSGRTRiSebuYvt6bPiHs/Bko8KAhJwiBqq/B7lgh0YGD2EiZW7Q73u2Fky4V1Q JNMjSek0ZLdRo2oyKdUHWyWt3rBMMoWgUEXEg= Received: by 10.216.220.216 with SMTP id o66mr363682wep.52.1316039035661; Wed, 14 Sep 2011 15:23:55 -0700 (PDT) Received: from osdor.le-roi-du-couscous.fr ([78.222.14.116]) by mx.google.com with ESMTPS id h20sm50709wbo.22.2011.09.14.15.23.54 (version=SSLv3 cipher=OTHER); Wed, 14 Sep 2011 15:23:55 -0700 (PDT) Sender: Louis Rilling From: Louis Rilling To: notmuch@notmuchmail.org Subject: [PATCH 3/4] test: Adding non-maildir tags does not move message from new to cur Date: Thu, 15 Sep 2011 00:23:20 +0200 Message-Id: <1316039001-32602-4-git-send-email-l.rilling@av7.net> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1316039001-32602-1-git-send-email-l.rilling@av7.net> References: <1316039001-32602-1-git-send-email-l.rilling@av7.net> Cc: Michal Sojka , Austin Clements 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: Wed, 14 Sep 2011 22:23:59 -0000 From: Michal Sojka Some MUA's like mutt show the difference between "new" emails living in maildir directory new/, and "old" emails living in maildir directory cur/. However notmuch tag unconditionally moves selected messages from new/ to cur/, even if no maildir synchronized tag is changed. While maildir specification forbids messages with tags living in new/, there is no need to move messages to cur/ when no maildir synchronized tag is changed. Thus notmuch can remain transparent with respect to other MUA's. [ Edited commit log to better describe the intended changes, and tag the test as broken until the actual changes are implemented -- Louis Rilling ] Signed-off-by: Louis Rilling --- test/maildir-sync | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/test/maildir-sync b/test/maildir-sync index a60854f..b3e90ae 100755 --- a/test/maildir-sync +++ b/test/maildir-sync @@ -88,6 +88,12 @@ test_expect_equal "$output" "No new mail." # creating new directories in the mail store, then it should be # creating all necessary database state for those directories. +test_begin_subtest "Adding non-maildir tags does not move message from new to cur" +add_message [subject]='"Message to stay in new"' [date]='"Sat, 01 Jan 2000 12:00:00 -0000"' [filename]='message-to-stay-in-new' [dir]=new +notmuch tag +donotmove subject:"Message to stay in new" +output=$(cd "$MAIL_DIR"; ls */message-to-stay-in-new*) +test_expect_equal_failure "$output" "new/message-to-stay-in-new" + test_begin_subtest "Removing 'S' flag from existing filename adds 'unread' tag" add_message [subject]='"Removing S flag"' [filename]='removing-s-flag:2,S' [dir]=cur output=$(notmuch search subject:"Removing S flag" | notmuch_search_sanitize) -- 1.7.2.5