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

Pieter Praet pieter at praet.org
Wed Feb 22 10:53:20 PST 2012


On Sun, 19 Feb 2012 23:08:30 +0200, Tomi Ollila <tomi.ollila at iki.fi> wrote:
> On Sun, 19 Feb 2012 21:38:28 +0100, Pieter Praet <pieter at 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


More information about the notmuch mailing list