From: Tomi Ollila Date: Thu, 23 May 2013 18:06:00 +0000 (+0300) Subject: [PATCH 2/4] test: added --stderr=FILE tests X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=a1ea7b2742fd7789a9d93677ed16fefca2c0cd35;p=notmuch-archives.git [PATCH 2/4] test: added --stderr=FILE tests --- diff --git a/b8/c9af972b0abc2e75d49f378857f85b7e250b6c b/b8/c9af972b0abc2e75d49f378857f85b7e250b6c new file mode 100644 index 000000000..ee1ec132a --- /dev/null +++ b/b8/c9af972b0abc2e75d49f378857f85b7e250b6c @@ -0,0 +1,77 @@ +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 EF977431FAF + for ; Thu, 23 May 2013 11:06:17 -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 IOBp9Q0jLh+X for ; + Thu, 23 May 2013 11:06:11 -0700 (PDT) +Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34]) + by olra.theworths.org (Postfix) with ESMTP id 8A87F431FB6 + for ; Thu, 23 May 2013 11:06:11 -0700 (PDT) +Received: by guru.guru-group.fi (Postfix, from userid 501) + id E40E71002C5; Thu, 23 May 2013 21:06:10 +0300 (EEST) +From: Tomi Ollila +To: notmuch@notmuchmail.org +Subject: [PATCH 2/4] test: added --stderr=FILE tests +Date: Thu, 23 May 2013 21:06:00 +0300 +Message-Id: <1369332362-4719-2-git-send-email-tomi.ollila@iki.fi> +X-Mailer: git-send-email 1.8.0 +In-Reply-To: <1369332362-4719-1-git-send-email-tomi.ollila@iki.fi> +References: <1369332362-4719-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: Thu, 23 May 2013 18:06:18 -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. +--- + +In the future this file (help-test) could be renamed and used in +more generic "global option" testing + + test/help-test | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +diff --git a/test/help-test b/test/help-test +index f7df725..8b77931 100755 +--- a/test/help-test ++++ b/test/help-test +@@ -9,4 +9,14 @@ 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 %" ++notmuch --stderr=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.1.4 +