]> git.cworth.org Git - obsolete/notmuch-old/commitdiff
test: added --stderr=FILE tests
authorTomi Ollila <tomi.ollila@iki.fi>
Tue, 28 May 2013 18:38:53 +0000 (21:38 +0300)
committerDavid Bremner <bremner@debian.org>
Wed, 29 May 2013 23:01:38 +0000 (20:01 -0300)
--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

index f7df725eea611797c333ba7a5a759cf31b9171f0..bd0111c995b905a21ec706723fe806514240aaa4 100755 (executable)
@@ -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