[PATCH v2 2/4] test: added --stderr=FILE tests
authorTomi Ollila <tomi.ollila@iki.fi>
Sun, 26 May 2013 08:45:52 +0000 (11:45 +0300)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:55:02 +0000 (09:55 -0800)
22/d3c45309536817b4c512b1f354ecbf7964ea02 [new file with mode: 0644]

diff --git a/22/d3c45309536817b4c512b1f354ecbf7964ea02 b/22/d3c45309536817b4c512b1f354ecbf7964ea02
new file mode 100644 (file)
index 0000000..bb41d4b
--- /dev/null
@@ -0,0 +1,72 @@
+Return-Path: <too@guru-group.fi>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 59CC1431FBF\r
+       for <notmuch@notmuchmail.org>; Sun, 26 May 2013 01:46:15 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
+       autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id mng60l1XBbln for <notmuch@notmuchmail.org>;\r
+       Sun, 26 May 2013 01:46:10 -0700 (PDT)\r
+Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])\r
+       by olra.theworths.org (Postfix) with ESMTP id 822D4431FD2\r
+       for <notmuch@notmuchmail.org>; Sun, 26 May 2013 01:46:01 -0700 (PDT)\r
+Received: by guru.guru-group.fi (Postfix, from userid 501)\r
+       id DF00C1001EE; Sun, 26 May 2013 11:45:58 +0300 (EEST)\r
+From: Tomi Ollila <tomi.ollila@iki.fi>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH v2 2/4] test: added --stderr=FILE tests\r
+Date: Sun, 26 May 2013 11:45:52 +0300\r
+Message-Id: <1369557954-13439-3-git-send-email-tomi.ollila@iki.fi>\r
+X-Mailer: git-send-email 1.8.0\r
+In-Reply-To: <1369557954-13439-1-git-send-email-tomi.ollila@iki.fi>\r
+References: <1369557954-13439-1-git-send-email-tomi.ollila@iki.fi>\r
+Cc: tomi.ollila@iki.fi\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Sun, 26 May 2013 08:46:16 -0000\r
+\r
+--stderr=FILE tests were added to test/help-test as it is the one\r
+doing most global option testing. Also, it was simplest to test\r
+this new option using `notmuch help` command.\r
+---\r
+ test/help-test | 9 +++++++++\r
+ 1 file changed, 9 insertions(+)\r
+\r
+diff --git a/test/help-test b/test/help-test\r
+index f7df725..bd0111c 100755\r
+--- a/test/help-test\r
++++ b/test/help-test\r
+@@ -9,4 +9,13 @@ test_expect_success 'notmuch help' 'notmuch help'\r
+ test_expect_success 'notmuch help tag' 'notmuch help tag'\r
+ test_expect_success 'notmuch --version' 'notmuch --version'\r
\r
++test_begin_subtest "notmuch --stderr=stderr help %"\r
++notmuch --stderr=stderr help %\r
++test_expect_equal "$(cat stderr)" "\r
++Sorry, % is not a known command. There's not much I can do to help."\r
++\r
++test_begin_subtest "notmuch --stderr=- help %"\r
++test_expect_equal "$(notmuch --stderr=- help %)" "\r
++Sorry, % is not a known command. There's not much I can do to help."\r
++\r
+ test_done\r
+-- \r
+1.8.0\r
+\r