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 A81C9431FBD for ; Thu, 23 Feb 2012 15:11:38 -0800 (PST) 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 0uWhBW+XH-f8 for ; Thu, 23 Feb 2012 15:11:38 -0800 (PST) Received: from mail-we0-f181.google.com (mail-we0-f181.google.com [74.125.82.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 18BE1431FAE for ; Thu, 23 Feb 2012 15:11:37 -0800 (PST) Received: by werp13 with SMTP id p13so1249384wer.26 for ; Thu, 23 Feb 2012 15:11:36 -0800 (PST) Received-SPF: pass (google.com: domain of pieter@praet.org designates 10.181.13.113 as permitted sender) client-ip=10.181.13.113; Authentication-Results: mr.google.com; spf=pass (google.com: domain of pieter@praet.org designates 10.181.13.113 as permitted sender) smtp.mail=pieter@praet.org Received: from mr.google.com ([10.181.13.113]) by 10.181.13.113 with SMTP id ex17mr762941wid.15.1330038696953 (num_hops = 1); Thu, 23 Feb 2012 15:11:36 -0800 (PST) MIME-Version: 1.0 Received: by 10.181.13.113 with SMTP id ex17mr617719wid.15.1330038696886; Thu, 23 Feb 2012 15:11:36 -0800 (PST) Received: from localhost ([109.131.181.26]) by mx.google.com with ESMTPS id q2sm7375333wiy.7.2012.02.23.15.11.36 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 23 Feb 2012 15:11:36 -0800 (PST) From: Pieter Praet To: David Bremner , Dmitry Kurochkin Subject: [PATCH 2/6] test: emacs: new test "notmuch-show: change tags of all messages in current buffer" Date: Fri, 24 Feb 2012 00:09:10 +0100 Message-Id: <1330038554-10347-2-git-send-email-pieter@praet.org> X-Mailer: git-send-email 1.7.8.1 In-Reply-To: <878vjtqhcg.fsf@praet.org> References: <878vjtqhcg.fsf@praet.org> X-Gm-Message-State: ALoCoQnGRndMLgrXOsl5yEeA3KsBsDgu/w51CzB4g+Vn/jzNKMfGkaoCBpcU17ufBRXhZqijCbtg Cc: Notmuch Mail 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: Thu, 23 Feb 2012 23:11:38 -0000 * test/emacs: New subtest "notmuch-show: change tags of all messages in current buffer": `notmuch-show-tag-all' ("*") changes tags of *all* messages in current buffer. --- test/emacs | 15 +++++++++++++++ 1 files changed, 15 insertions(+), 0 deletions(-) diff --git a/test/emacs b/test/emacs index ec1dbb0..d2dbafc 100755 --- a/test/emacs +++ b/test/emacs @@ -136,6 +136,21 @@ test_emacs "(notmuch-show \"$os_x_darwin_thread\") output=$(notmuch search $os_x_darwin_thread | notmuch_search_sanitize) test_expect_equal "$output" "thread:XXX 2009-11-18 [4/4] Jjgod Jiang, Alexander Botero-Lowry; [notmuch] Mac OS X/Darwin compatibility issues (inbox unread)" +test_begin_subtest "notmuch-show: change tags of all messages in current buffer" +query="$os_x_darwin_thread" +filter="from:Jiang" +add_tag="notmuch-show-tag-all" +del_tag="inbox" +count_total=$(notmuch count -- "$query") # = 4 +count_match=$(notmuch count -- "$query" AND "$filter") # = 2 +test_emacs "(notmuch-search \"$query AND $filter\") + (notmuch-test-wait) + (notmuch-search-show-thread) + (execute-kbd-macro \"*+$add_tag -$del_tag\")" +count_changed=$(notmuch count -- "$query" AND tag:"$add_tag" AND NOT tag:"$del_tag") +notmuch tag +"$del_tag" -"$add_tag" -- "$query" # revert tag changes +test_expect_equal "$count_changed" "$count_total" # assert that CHANGED == TOTAL + test_begin_subtest "Message with .. in Message-Id:" add_message [id]=123..456@example '[subject]="Message with .. in Message-Id"' test_emacs '(notmuch-search "id:\"123..456@example\"") -- 1.7.8.1