From f464694a16ba5ab8d4336698da37d728ee5afc86 Mon Sep 17 00:00:00 2001 From: Mark Walters Date: Wed, 21 Mar 2012 01:06:32 +0000 Subject: [PATCH] Re: [PATCH v2 1/6] test: emacs: new tests "notmuch-show: {add, remove} multiple tags {to, from} single message" --- 30/99d740fc8b486b1e56a3a73aced204c2090f41 | 143 ++++++++++++++++++++++ 1 file changed, 143 insertions(+) create mode 100644 30/99d740fc8b486b1e56a3a73aced204c2090f41 diff --git a/30/99d740fc8b486b1e56a3a73aced204c2090f41 b/30/99d740fc8b486b1e56a3a73aced204c2090f41 new file mode 100644 index 000000000..9758f956a --- /dev/null +++ b/30/99d740fc8b486b1e56a3a73aced204c2090f41 @@ -0,0 +1,143 @@ +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 21CE4431FC0 + for ; Tue, 20 Mar 2012 18:06:26 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -1.098 +X-Spam-Level: +X-Spam-Status: No, score=-1.098 tagged_above=-999 required=5 + tests=[DKIM_ADSP_CUSTOM_MED=0.001, FREEMAIL_FROM=0.001, + NML_ADSP_CUSTOM_MED=1.2, RCVD_IN_DNSWL_MED=-2.3] 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 ZQv6Wr+CF5dZ for ; + Tue, 20 Mar 2012 18:06:25 -0700 (PDT) +Received: from mail2.qmul.ac.uk (mail2.qmul.ac.uk [138.37.6.6]) + (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 6437B431FAF + for ; Tue, 20 Mar 2012 18:06:25 -0700 (PDT) +Received: from smtp.qmul.ac.uk ([138.37.6.40]) + by mail2.qmul.ac.uk with esmtp (Exim 4.71) + (envelope-from ) + id 1SAA0K-0001X9-CK; Wed, 21 Mar 2012 01:06:20 +0000 +Received: from 94-192-233-223.zone6.bethere.co.uk ([94.192.233.223] + helo=localhost) + by smtp.qmul.ac.uk with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.69) + (envelope-from ) + id 1SAA0K-0001NZ-0c; Wed, 21 Mar 2012 01:06:20 +0000 +From: Mark Walters +To: Pieter Praet , David Bremner , + Dmitry Kurochkin +Subject: Re: [PATCH v2 1/6] test: emacs: new tests "notmuch-show: {add, + remove} multiple tags {to, from} single message" +In-Reply-To: <1330122640-18895-2-git-send-email-pieter@praet.org> +References: <87wr7xqpuf.fsf@rocinante.cs.unb.ca> + <1330122640-18895-1-git-send-email-pieter@praet.org> + <1330122640-18895-2-git-send-email-pieter@praet.org> +User-Agent: Notmuch/0.12+67~g3bd579a (http://notmuchmail.org) Emacs/23.3.1 + (x86_64-pc-linux-gnu) +Date: Wed, 21 Mar 2012 01:06:32 +0000 +Message-ID: <874ntiyd7r.fsf@qmul.ac.uk> +MIME-Version: 1.0 +Content-Type: text/plain; charset=us-ascii +X-Sender-Host-Address: 94.192.233.223 +X-QM-SPAM-Info: Sender has good ham record. :) +X-QM-Body-MD5: 2c8534889bcd95136a5f16bee42a9dad (of first 20000 bytes) +X-SpamAssassin-Score: -1.8 +X-SpamAssassin-SpamBar: - +X-SpamAssassin-Report: The QM spam filters have analysed this message to + determine if it is + spam. We require at least 5.0 points to mark a message as spam. + This message scored -1.8 points. + Summary of the scoring: + * -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, + * medium trust + * [138.37.6.40 listed in list.dnswl.org] + * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail + provider * (markwalters1009[at]gmail.com) + * -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay + * domain + * 0.5 AWL AWL: From: address is in the auto white-list +X-QM-Scan-Virus: ClamAV says the message is clean +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: Wed, 21 Mar 2012 01:06:26 -0000 + + +Hi + +> * test/emacs: +> +> - Rename subtests "{Add,Remove} tag from notmuch-show view" to +> "notmuch-show: {add,remove} single tag {to,from} single message" +> to be consistent with the following tests. +> +> - New subtest "notmuch-show: add multiple tags to single message": +> `notmuch-show-add-tag' ("+") can add multiple tags to a message. +> +> - New subtest "notmuch-show: remove multiple tags from single message": +> `notmuch-show-remove-tag' ("-") can remove multiple tags from a message. +> --- +> test/emacs | 16 ++++++++++++++-- +> 1 files changed, 14 insertions(+), 2 deletions(-) +> +> diff --git a/test/emacs b/test/emacs +> index b74cfa9..ec1dbb0 100755 +> --- a/test/emacs +> +++ b/test/emacs +> @@ -112,18 +112,30 @@ test_emacs "(notmuch-search \"$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 "Add tag from notmuch-show view" +> +test_begin_subtest "notmuch-show: add single tag to single message" +> test_emacs "(notmuch-show \"$os_x_darwin_thread\") +> (execute-kbd-macro \"+tag-from-show-view\")" +> 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 tag-from-show-view unread)" +> +> -test_begin_subtest "Remove tag from notmuch-show view" +> +test_begin_subtest "notmuch-show: remove single tag from single message" +> test_emacs "(notmuch-show \"$os_x_darwin_thread\") +> (execute-kbd-macro \"-tag-from-show-view\")" +> 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: add multiple tags to single message" +> +test_emacs "(notmuch-show \"$os_x_darwin_thread\") +> + (execute-kbd-macro \"+tag1-from-show-view +tag2-from-show-view\")" +> +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 tag1-from-show-view tag2-from-show-view unread)" +> + +> +test_begin_subtest "notmuch-show: remove multiple tags from single message" +> +test_emacs "(notmuch-show \"$os_x_darwin_thread\") +> + (execute-kbd-macro \"-tag1-from-show-view -tag2-from-show-view\")" +> +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 "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\"") + + +This looks good to me but I think it would be nice to have an extra test +for adding a tag and removing a tag simultaneously. + +Best wishes + +Mark -- 2.26.2