[PATCH 1/2] test: add test for emacs notmuch-show-strip-re function
Tomi Ollila
tomi.ollila at iki.fi
Tue Jun 5 10:40:57 PDT 2012
On Tue, Jun 05 2012, Jani Nikula <jani at nikula.org> wrote:
> The function is used for stripping "re:" from subjects to generate
> "bare subjects". Include broken test for having "re:" in the middle of
> the subject.
LGTM
Tomi
> ---
> test/emacs-show | 13 +++++++++++++
> 1 file changed, 13 insertions(+)
>
> diff --git a/test/emacs-show b/test/emacs-show
> index 2498564..1ddb28e 100755
> --- a/test/emacs-show
> +++ b/test/emacs-show
> @@ -24,4 +24,17 @@ test_emacs "(notmuch-show \"id:$message_id\")
> (test-visible-output)"
> test_expect_equal_file OUTPUT EXPECTED
>
> +test_begin_subtest "Bare subject #1"
> +output=$(test_emacs '(notmuch-show-strip-re "Re: subject")')
> +test_expect_equal "$output" '"subject"'
> +
> +test_begin_subtest "Bare subject #2"
> +output=$(test_emacs '(notmuch-show-strip-re "re:Re: re: Re: re:subject")')
> +test_expect_equal "$output" '"subject"'
> +
> +test_begin_subtest "Bare subject #3"
> +test_subtest_known_broken
> +output=$(test_emacs '(notmuch-show-strip-re "the cure: fix the regexp")')
> +test_expect_equal "$output" '"the cure: fix the regexp"'
> +
> test_done
> --
> 1.7.9.5
>
> _______________________________________________
> notmuch mailing list
> notmuch at notmuchmail.org
> http://notmuchmail.org/mailman/listinfo/notmuch
More information about the notmuch
mailing list