diff options
author | Jani Nikula <jani@nikula.org> | 2014-01-26 20:58:46 +0200 |
---|---|---|
committer | David Bremner <david@tethera.net> | 2014-01-27 08:42:08 -0400 |
commit | 3e1d7f6476f94d9912e395872317606fb702f210 (patch) | |
tree | a862134a11a579ae39f2a8a183957a50ed068ddc /test | |
parent | 1c2f2c960c0773cea77c256ef319a3fe08f7eecb (diff) |
test: add basic tests for notmuch new --quiet option
This does not cover all the possible paths notmuch new could output
stuff, but it's better than nothing.
Diffstat (limited to 'test')
-rwxr-xr-x | test/T050-new.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/T050-new.sh b/test/T050-new.sh index f27423da..b7668ff0 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 |