From 9704cb403e36c2c211b692616f156bacb4bd6b7e Mon Sep 17 00:00:00 2001 From: Ethan Glasser-Camp Date: Tue, 16 Oct 2012 22:15:30 +2000 Subject: [PATCH] Re: [PATCH v2 2/6] test: emacs: new test "notmuch-show: change tags of all messages in current buffer" --- c2/11b553b289674d390b55d20079aa1950c57b31 | 104 ++++++++++++++++++++++ 1 file changed, 104 insertions(+) create mode 100644 c2/11b553b289674d390b55d20079aa1950c57b31 diff --git a/c2/11b553b289674d390b55d20079aa1950c57b31 b/c2/11b553b289674d390b55d20079aa1950c57b31 new file mode 100644 index 000000000..d4a48d7eb --- /dev/null +++ b/c2/11b553b289674d390b55d20079aa1950c57b31 @@ -0,0 +1,104 @@ +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 B405B431FB6 + for ; Mon, 15 Oct 2012 19:15:35 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -0.799 +X-Spam-Level: +X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5 + tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-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 KcIjNxhIPINw for ; + Mon, 15 Oct 2012 19:15:35 -0700 (PDT) +Received: from mail-qc0-f181.google.com (mail-qc0-f181.google.com + [209.85.216.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 1F933431FAE + for ; Mon, 15 Oct 2012 19:15:35 -0700 (PDT) +Received: by mail-qc0-f181.google.com with SMTP id x40so5261487qcp.26 + for ; Mon, 15 Oct 2012 19:15:34 -0700 (PDT) +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; + h=from:to:cc:subject:in-reply-to:references:user-agent:date + :message-id:mime-version:content-type; + bh=Ogpn6EadXLfkrvHZwU1dw49lqo/C+AUSkl7z8wHrTUc=; + b=BR2HPtIhi7nUQGjgu9OZrcO/H+Ss5zQBBvesrJfET3ElnYbR2fLemq+YT17Tl8zk0a + 15Bw4+GHCyem7Mp6fMmi8/zsKlw2DEM6Rp0XG+G7vbihT6qM0EL9hx+iq4RY7zPLL4Qz + IP7fvkSTirsz1CfxmnzXvC12Efw/BqvWSflwgEZfoREVt+o6W9+KRexs34ieSsuk84o5 + Utuq/LoBgkc29LLNuLp9W4R687huXkClHVkQBa1VifY0cpG/yTNikl4ZuXIPJd8pZLKF + FbBeFbyKgbp9G7LgaLAPO7+KOG0qJH128udNJrY5xfaVjfBwhTJJLpm9cTsAv2UcxA2F + F9EQ== +Received: by 10.229.38.17 with SMTP id z17mr6729659qcd.30.1350353734438; + Mon, 15 Oct 2012 19:15:34 -0700 (PDT) +Received: from smtp.gmail.com (p70-80.acedsl.com. [66.114.70.80]) + by mx.google.com with ESMTPS id + ig20sm14207080qab.19.2012.10.15.19.15.31 + (version=TLSv1/SSLv3 cipher=OTHER); + Mon, 15 Oct 2012 19:15:33 -0700 (PDT) +From: Ethan Glasser-Camp +To: Pieter Praet , David Bremner , + Dmitry Kurochkin +Subject: Re: [PATCH v2 2/6] test: emacs: new test "notmuch-show: change tags + of all messages in current buffer" +In-Reply-To: <1330122640-18895-3-git-send-email-pieter@praet.org> +References: <87wr7xqpuf.fsf@rocinante.cs.unb.ca> + <1330122640-18895-1-git-send-email-pieter@praet.org> + <1330122640-18895-3-git-send-email-pieter@praet.org> +User-Agent: Notmuch/0.14+45~g6ea9330 (http://notmuchmail.org) Emacs/23.3.1 + (x86_64-pc-linux-gnu) +Date: Mon, 15 Oct 2012 22:15:30 -0400 +Message-ID: <87txtv88n1.fsf@betacantrips.com> +MIME-Version: 1.0 +Content-Type: text/plain; charset=us-ascii +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: Tue, 16 Oct 2012 02:15:35 -0000 + +Pieter Praet writes: + +> * 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 + +In this test, what use is count_match? Just so that the tests' forms +are the same? Maybe you want to put an assertion that count_total != +count_match, just for sanity's sake? + +Otherwise, patches 1-3 look fine to me. + +Ethan -- 2.26.2