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
_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org

Reply via email to