Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 59CC1431FBF for ; Sun, 26 May 2013 01:46:15 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id mng60l1XBbln for ; Sun, 26 May 2013 01:46:10 -0700 (PDT) Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34]) by olra.theworths.org (Postfix) with ESMTP id 822D4431FD2 for ; Sun, 26 May 2013 01:46:01 -0700 (PDT) Received: by guru.guru-group.fi (Postfix, from userid 501) id DF00C1001EE; Sun, 26 May 2013 11:45:58 +0300 (EEST) From: Tomi Ollila To: notmuch@notmuchmail.org Subject: [PATCH v2 2/4] test: added --stderr=FILE tests Date: Sun, 26 May 2013 11:45:52 +0300 Message-Id: <1369557954-13439-3-git-send-email-tomi.ollila@iki.fi> X-Mailer: git-send-email 1.8.0 In-Reply-To: <1369557954-13439-1-git-send-email-tomi.ollila@iki.fi> References: <1369557954-13439-1-git-send-email-tomi.ollila@iki.fi> Cc: tomi.ollila@iki.fi X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 May 2013 08:46:16 -0000 --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 f7df725..bd0111c 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 -- 1.8.0