Re: [PATCH v2 4/4] test: emacs: new test "notmuch-search: change tags of all matching messages"

Subject: Re: [PATCH v2 4/4] test: emacs: new test "notmuch-search: change tags of all matching messages"

Date: Wed, 22 Feb 2012 19:53:20 +0100

To: Tomi Ollila, Notmuch Mail

Cc:

From: Pieter Praet


On Sun, 19 Feb 2012 23:08:30 +0200, Tomi Ollila <tomi.ollila@iki.fi> wrote:
> On Sun, 19 Feb 2012 21:38:28 +0100, Pieter Praet <pieter@praet.org> wrote:
> > `notmuch-search-tag-all' (bound to "*") adds and removes tags
> > to/from all messages which match the query used to populate the
> > current search buffer.
> > ---
> >  test/emacs |   32 ++++++++++++++++++++++++++++++++
> >  1 files changed, 32 insertions(+), 0 deletions(-)
> > 
> 
> [ ... ]
> 
> > +old_tag_count_1=$(notmuch count tag:"${old_tag}" "${filter}")
> > +new_tag_count_1=$(notmuch count tag:"${new_tag}" "${filter}")
> > +test "${old_tag_count_1}" == "0" && old_tag_count_1="Need 1+ matches!"
> > +test "${new_tag_count_1}" == "0" || new_tag_count_1="Need 0 matches!"
> > +# Change tags of all matching messages and get tag counts
> > +test_emacs "(notmuch-search \"tag:${old_tag} ${filter}\")
> 
> Small nit: string equality comparison operator is '='. 
> Use  grep '==' test/*  to confirm (or man test).
>

Argh...  Nice catch!


> [ ... ]
> 
> Tomi


Peace

-- 
Pieter

Thread: