* [PATCH] test: add basic tests for notmuch new --quiet option
@ 2014-01-26 18:58 Jani Nikula
2014-01-26 19:31 ` Mark Walters
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Jani Nikula @ 2014-01-26 18:58 UTC (permalink / raw)
To: notmuch
This does not cover all the possible paths notmuch new could output
stuff, but it's better than nothing.
---
test/T050-new.sh | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/test/T050-new.sh b/test/T050-new.sh
index f27423d..b7668ff 100755
--- a/test/T050-new.sh
+++ b/test/T050-new.sh
@@ -248,4 +248,19 @@ ln -s i_do_not_exist "${MAIL_DIR}"/broken_link
output=$(NOTMUCH_NEW 2>&1)
test_expect_equal "$output" "No new mail."
+test_begin_subtest "Quiet: No new mail."
+output=$(NOTMUCH_NEW --quiet)
+test_expect_equal "$output" ""
+
+test_begin_subtest "Quiet: new, removed and renamed messages."
+# new
+generate_message
+# deleted
+notmuch search --format=text0 --output=files --limit=1 '*' | xargs -0 rm
+# moved
+mkdir "${MAIL_DIR}"/moved_messages
+notmuch search --format=text0 --output=files --offset=1 --limit=1 '*' | xargs -0 -I {} mv {} "${MAIL_DIR}"/moved_messages
+output=$(NOTMUCH_NEW --quiet)
+test_expect_equal "$output" ""
+
test_done
--
1.8.5.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] test: add basic tests for notmuch new --quiet option
2014-01-26 18:58 [PATCH] test: add basic tests for notmuch new --quiet option Jani Nikula
@ 2014-01-26 19:31 ` Mark Walters
2014-01-26 19:58 ` Tomi Ollila
2014-01-27 12:57 ` David Bremner
2 siblings, 0 replies; 4+ messages in thread
From: Mark Walters @ 2014-01-26 19:31 UTC (permalink / raw)
To: Jani Nikula, notmuch
LGTM +1.
Best wishes
Mark
On Sun, 26 Jan 2014, Jani Nikula <jani@nikula.org> wrote:
> This does not cover all the possible paths notmuch new could output
> stuff, but it's better than nothing.
> ---
> test/T050-new.sh | 15 +++++++++++++++
> 1 file changed, 15 insertions(+)
>
> diff --git a/test/T050-new.sh b/test/T050-new.sh
> index f27423d..b7668ff 100755
> --- a/test/T050-new.sh
> +++ b/test/T050-new.sh
> @@ -248,4 +248,19 @@ ln -s i_do_not_exist "${MAIL_DIR}"/broken_link
> output=$(NOTMUCH_NEW 2>&1)
> test_expect_equal "$output" "No new mail."
>
> +test_begin_subtest "Quiet: No new mail."
> +output=$(NOTMUCH_NEW --quiet)
> +test_expect_equal "$output" ""
> +
> +test_begin_subtest "Quiet: new, removed and renamed messages."
> +# new
> +generate_message
> +# deleted
> +notmuch search --format=text0 --output=files --limit=1 '*' | xargs -0 rm
> +# moved
> +mkdir "${MAIL_DIR}"/moved_messages
> +notmuch search --format=text0 --output=files --offset=1 --limit=1 '*' | xargs -0 -I {} mv {} "${MAIL_DIR}"/moved_messages
> +output=$(NOTMUCH_NEW --quiet)
> +test_expect_equal "$output" ""
> +
> test_done
> --
> 1.8.5.2
>
> _______________________________________________
> notmuch mailing list
> notmuch@notmuchmail.org
> http://notmuchmail.org/mailman/listinfo/notmuch
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] test: add basic tests for notmuch new --quiet option
2014-01-26 18:58 [PATCH] test: add basic tests for notmuch new --quiet option Jani Nikula
2014-01-26 19:31 ` Mark Walters
@ 2014-01-26 19:58 ` Tomi Ollila
2014-01-27 12:57 ` David Bremner
2 siblings, 0 replies; 4+ messages in thread
From: Tomi Ollila @ 2014-01-26 19:58 UTC (permalink / raw)
To: Jani Nikula, notmuch
On Sun, Jan 26 2014, Jani Nikula <jani@nikula.org> wrote:
> This does not cover all the possible paths notmuch new could output
> stuff, but it's better than nothing.
> ---
LGTM.
Tomi
> test/T050-new.sh | 15 +++++++++++++++
> 1 file changed, 15 insertions(+)
>
> diff --git a/test/T050-new.sh b/test/T050-new.sh
> index f27423d..b7668ff 100755
> --- a/test/T050-new.sh
> +++ b/test/T050-new.sh
> @@ -248,4 +248,19 @@ ln -s i_do_not_exist "${MAIL_DIR}"/broken_link
> output=$(NOTMUCH_NEW 2>&1)
> test_expect_equal "$output" "No new mail."
>
> +test_begin_subtest "Quiet: No new mail."
> +output=$(NOTMUCH_NEW --quiet)
> +test_expect_equal "$output" ""
> +
> +test_begin_subtest "Quiet: new, removed and renamed messages."
> +# new
> +generate_message
> +# deleted
> +notmuch search --format=text0 --output=files --limit=1 '*' | xargs -0 rm
> +# moved
> +mkdir "${MAIL_DIR}"/moved_messages
> +notmuch search --format=text0 --output=files --offset=1 --limit=1 '*' | xargs -0 -I {} mv {} "${MAIL_DIR}"/moved_messages
> +output=$(NOTMUCH_NEW --quiet)
> +test_expect_equal "$output" ""
> +
> test_done
> --
> 1.8.5.2
>
> _______________________________________________
> notmuch mailing list
> notmuch@notmuchmail.org
> http://notmuchmail.org/mailman/listinfo/notmuch
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] test: add basic tests for notmuch new --quiet option
2014-01-26 18:58 [PATCH] test: add basic tests for notmuch new --quiet option Jani Nikula
2014-01-26 19:31 ` Mark Walters
2014-01-26 19:58 ` Tomi Ollila
@ 2014-01-27 12:57 ` David Bremner
2 siblings, 0 replies; 4+ messages in thread
From: David Bremner @ 2014-01-27 12:57 UTC (permalink / raw)
To: Jani Nikula, notmuch
Jani Nikula <jani@nikula.org> writes:
> This does not cover all the possible paths notmuch new could output
> stuff, but it's better than nothing.
pushed. really, honest.
d
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-01-27 12:57 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-26 18:58 [PATCH] test: add basic tests for notmuch new --quiet option Jani Nikula
2014-01-26 19:31 ` Mark Walters
2014-01-26 19:58 ` Tomi Ollila
2014-01-27 12:57 ` David Bremner
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).