diff options
author | Junio C Hamano <gitster@pobox.com> | 2016-05-06 00:36:55 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-05-10 22:57:48 +0300 |
commit | ab6b28b02f4db52ab5bad342592399f2559b4d81 (patch) | |
tree | 1fe44b709db0eef9590f63b0de7af6ac257ff71e /hex.c | |
parent | accac4199c1d28dfd6c860b32d7111c3de8df7a6 (diff) |
test-parse-options: --expect=<string> option to simplify tests
Existing tests in t0040 follow a rather verbose pattern:
cat >expect <<\EOF
boolean: 0
integer: 0
magnitude: 0
timestamp: 0
string: (not set)
abbrev: 7
verbose: 0
quiet: 3
dry run: no
file: (not set)
EOF
test_expect_success 'multiple quiet levels' '
test-parse-options -q -q -q >output 2>output.err &&
test_must_be_empty output.err &&
test_cmp expect output
'
But the only thing this test cares about is if "quiet: 3" is in the
output. We should be able to write the above 18 lines with just
four lines, like this:
test_expect_success 'multiple quiet levels' '
test-parse-options --expect="quiet: 3" -q -q -q
'
Teach the new --expect=<string> option to test-parse-options helper.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'hex.c')
0 files changed, 0 insertions, 0 deletions