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 47C17431FDD for ; Mon, 2 Sep 2013 22:19:17 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 OsW+z99tYvuv for ; Mon, 2 Sep 2013 22:19:08 -0700 (PDT) Received: from mail-ea0-f178.google.com (mail-ea0-f178.google.com [209.85.215.178]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id B4885431FDA for ; Mon, 2 Sep 2013 22:19:07 -0700 (PDT) Received: by mail-ea0-f178.google.com with SMTP id a15so2700219eae.23 for ; Mon, 02 Sep 2013 22:19:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=9efQWUv8kZBoF238XjhU7LhyXNViPrzp2PHBNofGecQ=; b=Rme2ylUxuGVbaznUU7Ffn4bLbnFwrzta/8dg1aklBwsf8LPPHfEBTVn1/f6nhiFBoC x0YGFGhYciGgSOI6PNDQtNRjOKX+mRQ6PDNy9iCMQqoxa5f6ACnjuelA3OumfCoCT/7R TSX/WDCi45hqeDnlTiXBnMkFc/TFvi43HFbaLPcuEcxQyaK24OOBnAfZzF499CC8zVPv PPCswEP3Ycx/yh9c1xBSZIDK+G79owdHvcElzQVzwb4hSZXCO7b74ryTfJvIcGExJDaj gwRWsJvTZ38/NlcvWj6vgPNM1vqkImPQ1uy7zS8XkK5rfOwjbJzxOuawBU0Zl3mmozT9 sbKg== X-Gm-Message-State: ALoCoQkyn4X/3ustqCSSOHcvvx/jzcU9n2NExzJFpme18jdVNHdYvKjMH03hxmNXqLj3b7PIcTLL X-Received: by 10.14.87.135 with SMTP id y7mr507546eee.69.1378185544527; Mon, 02 Sep 2013 22:19:04 -0700 (PDT) Received: from localhost (dsl-hkibrasgw2-58c36f-91.dhcp.inet.fi. [88.195.111.91]) by mx.google.com with ESMTPSA id b45sm28227805eef.4.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 02 Sep 2013 22:19:03 -0700 (PDT) From: Jani Nikula To: notmuch@notmuchmail.org Subject: [PATCH 1/2] test: add more maildir flag syncing related tests to insert Date: Tue, 3 Sep 2013 08:19:02 +0300 Message-Id: <1378185543-25271-1-git-send-email-jani@nikula.org> X-Mailer: git-send-email 1.8.4.rc3 In-Reply-To: <1378170613-3584-1-git-send-email-david@tethera.net> References: <1378170613-3584-1-git-send-email-david@tethera.net> 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: Tue, 03 Sep 2013 05:19:17 -0000 Specifically test maildir flag syncing with insert. --- These are additional tests on top of David's fix. --- test/insert | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/test/insert b/test/insert index 1718120..9b448e5 100755 --- a/test/insert +++ b/test/insert @@ -77,6 +77,42 @@ notmuch insert +custom -unread < "$gen_msg_filename" output=$(notmuch count tag:custom NOT tag:unread) test_expect_equal "$output" "1" +test_begin_subtest "Insert message with default tags stays in new/" +gen_insert_msg +notmuch insert < "$gen_msg_filename" +output=$(notmuch search --output=files id:$gen_msg_id) +dirname=$(dirname "$output") +test_expect_equal "$dirname" "$MAIL_DIR/new" + +test_begin_subtest "Insert message with non-maildir synced tags stays in new/" +gen_insert_msg +notmuch insert +custom -inbox < "$gen_msg_filename" +output=$(notmuch search --output=files id:$gen_msg_id) +dirname=$(dirname "$output") +test_expect_equal "$dirname" "$MAIL_DIR/new" + +test_begin_subtest "Insert message with custom new.tags goes to cur/" +OLDCONFIG=$(notmuch config get new.tags) +notmuch config set new.tags test +gen_insert_msg +notmuch insert < "$gen_msg_filename" +output=$(notmuch search --output=files id:$gen_msg_id) +dirname=$(dirname "$output") +notmuch config set new.tags $OLDCONFIG +test_expect_equal "$dirname" "$MAIL_DIR/cur" + +# additional check on the previous message +test_begin_subtest "Insert message with custom new.tags actually gets the tags" +output=$(notmuch search --output=tags id:$gen_msg_id) +test_expect_equal "$output" "test" + +test_begin_subtest "Insert message with maildir synced tags goes to cur/" +gen_insert_msg +notmuch insert +flagged < "$gen_msg_filename" +output=$(notmuch search --output=files id:$gen_msg_id) +dirname=$(dirname "$output") +test_expect_equal "$dirname" "$MAIL_DIR/cur" + test_begin_subtest "Insert message into folder" gen_insert_msg notmuch insert --folder=Drafts < "$gen_msg_filename" -- 1.8.4.rc3