summaryrefslogtreecommitdiff
path: root/contrib/diff-highlight
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2016-05-05 14:36:55 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2016-05-10 12:57:48 -0700
commitab6b28b02f4db52ab5bad342592399f2559b4d81 (patch)
tree1fe44b709db0eef9590f63b0de7af6ac257ff71e /contrib/diff-highlight
parenttest-parse-options: fix output when callback option fails (diff)
downloadtgif-ab6b28b02f4db52ab5bad342592399f2559b4d81.tar.xz
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 'contrib/diff-highlight')
0 files changed, 0 insertions, 0 deletions