From ff598e4fdd580d9c7e19eb784b2ed137605d166f Mon Sep 17 00:00:00 2001 From: Tomi Ollila Date: Tue, 28 May 2013 21:38:53 +0300 Subject: [PATCH] test: added --stderr=FILE tests --stderr=FILE tests were added to test/help-test as it is the one doing most global option testing. Also, it was simplest to test this new option using `notmuch help` command. --- test/help-test | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/help-test b/test/help-test index f7df725e..bd0111c9 100755 --- a/test/help-test +++ b/test/help-test @@ -9,4 +9,13 @@ test_expect_success 'notmuch help' 'notmuch help' test_expect_success 'notmuch help tag' 'notmuch help tag' test_expect_success 'notmuch --version' 'notmuch --version' +test_begin_subtest "notmuch --stderr=stderr help %" +notmuch --stderr=stderr help % +test_expect_equal "$(cat stderr)" " +Sorry, % is not a known command. There's not much I can do to help." + +test_begin_subtest "notmuch --stderr=- help %" +test_expect_equal "$(notmuch --stderr=- help %)" " +Sorry, % is not a known command. There's not much I can do to help." + test_done