unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Tomi Ollila <tomi.ollila@iki.fi>
To: Mohsin Kaleem <mohkale@kisara.moe>, notmuch@notmuchmail.org
Subject: Re: [PATCH 6/9] test: Add test cases for new exclude option
Date: Mon, 08 Aug 2022 21:56:27 +0300	[thread overview]
Message-ID: <y3ds57h.987w9m-too@iki.fi> (raw)
In-Reply-To: <20220807145733.129867-6-mohkale@kisara.moe>

On Sun, Aug 07 2022, Mohsin Kaleem wrote:

> ---
>  test/T461-emacs-search-exclude.sh             | 99 +++++++++++++++++++
>  .../notmuch-search-tag-inbox-with-excluded    | 25 +++++
>  .../notmuch-search-tag-inbox-without-excluded | 21 ++++
>  .../notmuch-tree-tag-inbox-with-excluded      | 53 ++++++++++
>  .../notmuch-tree-tag-inbox-without-excluded   | 49 +++++++++
>  5 files changed, 247 insertions(+)
>  create mode 100755 test/T461-emacs-search-exclude.sh
>  create mode 100644 test/emacs-exclude.expected-output/notmuch-search-tag-inbox-with-excluded
>  create mode 100644 test/emacs-exclude.expected-output/notmuch-search-tag-inbox-without-excluded
>  create mode 100644 test/emacs-exclude.expected-output/notmuch-tree-tag-inbox-with-excluded
>  create mode 100644 test/emacs-exclude.expected-output/notmuch-tree-tag-inbox-without-excluded
>
> diff --git a/test/T461-emacs-search-exclude.sh b/test/T461-emacs-search-exclude.sh
> new file mode 100755
> index 00000000..bf558847
> --- /dev/null
> +++ b/test/T461-emacs-search-exclude.sh
> @@ -0,0 +1,99 @@
> +#!/usr/bin/env bash
> +
> +test_description="exclude options persist between Emacs search and tree modes"
> +. $(dirname "$0")/test-lib.sh || exit 1
> +. $NOTMUCH_SRCDIR/test/test-lib-emacs.sh || exit 1
> +
> +EXPECTED=$NOTMUCH_SRCDIR/test/emacs-exclude.expected-output
> +
> +test_require_emacs
> +add_email_corpus
> +notmuch config set search.exclude_tags deleted
> +notmuch tag +deleted -- 'from:"Stewart Smith"' or 'from:"Chris Wilson"'
> +
> +# Basic test cases just asserting exclude option is working and consistent.
> +
> +test_begin_subtest "Search doesn't contain excluded mail by default"
> +test_emacs '(notmuch-hello)
> +	    (goto-char (point-min))
> +	    (re-search-forward "inbox")
> +	    (widget-button-press (1- (point)))
> +	    (notmuch-test-wait)
> +	    (test-output)
> +	    (delete-other-windows)'
> +test_expect_equal_file $EXPECTED/notmuch-search-tag-inbox-without-excluded OUTPUT
> +
> +test_begin_subtest "Toggling exclude in search will show excluded mail"
> +test_emacs '(notmuch-hello)
> +	    (goto-char (point-min))
> +	    (re-search-forward "inbox")
> +	    (widget-button-press (1- (point)))
> +	    (notmuch-test-wait)
> +      (notmuch-search-toggle-exclude)

It looks like tab width was not 8 when these (notmuch-search-toggle-exclude)
were added, accidentally indented w/ leading space, not tab ;/

(ditto for all other (notmuch-search-toggle-exclude), rest of the content
removed.)

> +	    (notmuch-test-wait)

Otherwise, in this large set of changes, I could not see anything alarming,
but I did not test (I even don't know how, as I don't have excludes...)

Tomi

  reply	other threads:[~2022-08-08 18:56 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-28 20:02 [PATCH] emacs: add new option notmuch-search-exclude Mohsin Kaleem
2021-12-24  0:33 ` David Bremner
2022-03-22 13:27   ` Mohsin Kaleem
2022-03-22 19:21     ` David Bremner
2022-03-22 19:38       ` Mohsin Kaleem
2022-03-22 19:59         ` David Bremner
2022-03-22 20:07           ` Mohsin Kaleem
2022-03-22 20:19             ` David Bremner
2022-03-22 20:27               ` Mohsin Kaleem
2022-03-25 19:36                 ` David Bremner
2022-07-24 20:59                   ` Mohsin Kaleem
2022-07-30 14:02                     ` David Bremner
2022-08-07 14:57                       ` [PATCH 1/9] " Mohsin Kaleem
2022-08-07 14:57                         ` [PATCH 2/9] docs: Update with notmuch-*-toggle-exclude Mohsin Kaleem
2022-08-12 10:42                           ` David Bremner
2022-08-07 14:57                         ` [PATCH 3/9] test: Fix Search handles subprocess error exit codes Mohsin Kaleem
2022-08-07 14:57                         ` [PATCH 4/9] feat: Allow :exclude configuration in notmuch-hello Mohsin Kaleem
2022-08-12 10:46                           ` David Bremner
2022-08-07 14:57                         ` [PATCH 5/9] feat: Add more interactive specs Mohsin Kaleem
2022-08-12 10:48                           ` David Bremner
2022-08-07 14:57                         ` [PATCH 6/9] test: Add test cases for new exclude option Mohsin Kaleem
2022-08-08 18:56                           ` Tomi Ollila [this message]
2022-08-08 19:20                             ` Mohsin Kaleem
2022-08-12 10:49                           ` David Bremner
2022-08-07 14:57                         ` [PATCH 7/9] test: Fix Navigation of notmuch-hello to search results Mohsin Kaleem
2022-08-12 10:51                           ` David Bremner
2022-08-07 14:57                         ` [PATCH 8/9] review: Rename variables to better express intention Mohsin Kaleem
2022-08-12 10:55                           ` David Bremner
2022-08-07 14:57                         ` [PATCH 9/9] build: Fix declare-function calls for updated functions Mohsin Kaleem
2022-08-07 15:00                       ` [PATCH] emacs: add new option notmuch-search-exclude Mohsin Kaleem
2022-08-12 11:12                         ` David Bremner
2022-08-12 11:18                           ` David Bremner
2023-04-16 13:18                       ` [PATCH v2 0/3] emacs: Add new option notmuch-search-hide-excluded mohkale
2023-04-16 13:18                         ` [PATCH v2 1/3] " mohkale
2023-05-03 19:59                           ` David Bremner
2023-05-05 11:43                             ` Mohsin Kaleem
2023-05-07 12:27                               ` David Bremner
2023-05-07 13:19                           ` David Bremner
2023-04-16 13:18                         ` [PATCH v2 2/3] emacs: Allow notmuch-saved-searches to hide excluded messages mohkale
2023-05-07 13:39                           ` David Bremner
2024-03-10 18:48                             ` Mohsin Kaleem
2023-05-07 20:13                           ` David Bremner
2023-04-16 13:18                         ` [PATCH v2 3/3] test/emacs: Add test cases for notmuch-search-hide-excluded mohkale
2023-05-07 20:19                           ` David Bremner
2024-03-10 18:57                         ` [PATCH v3] emacs: Add new option notmuch-search-hide-excluded mohkale

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=y3ds57h.987w9m-too@iki.fi \
    --to=tomi.ollila@iki.fi \
    --cc=mohkale@kisara.moe \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).