test: Better handling of stdout and stderr
authorMichal Sojka <sojkam1@fel.cvut.cz>
Sun, 14 Nov 2010 21:54:28 +0000 (22:54 +0100)
committerCarl Worth <cworth@cworth.org>
Tue, 16 Nov 2010 19:28:06 +0000 (11:28 -0800)
commitac9dbb47de734afb0ddd4d0b2eb8f5027b1a7f60
tree408ad9517cd4d2388909d258a1ecc4975389f5cf
parent75d616c6caa0e0ac51c34371ebee7574dbea2952
test: Better handling of stdout and stderr

Git-style tests (test_expect_success etc.) suppress stdout and stderr
unless -v is given. Notmuch-style tests (created by test_begin_subtest
and test_expect_equal) do not have this behavior so implement it the
same.

Additionally, for both test styles, the test-lib.sh is changed so that
the content of suppressed stdout and stderr is shown in case of failed
test.

Finally a test for this functionality is added to basic tests.
test/basic
test/test-lib.sh
test/test-verbose [new file with mode: 0755]
test/test.expected-output/test-verbose-no [new file with mode: 0644]
test/test.expected-output/test-verbose-yes [new file with mode: 0644]