diff options
author | Junio C Hamano <gitster@pobox.com> | 2019-12-25 11:22:01 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-12-25 11:22:01 -0800 |
commit | c0c6a7459410592a7c9ae95080e349015b890900 (patch) | |
tree | a936c6c800f754a6ab2c6912254ee6d33b4b0f7f /t | |
parent | Merge branch 'js/add-p-in-c' (diff) | |
parent | t4015: improve coverage of function context test (diff) | |
download | tgif-c0c6a7459410592a7c9ae95080e349015b890900.tar.xz |
Merge branch 'rs/xdiff-ignore-ws-w-func-context'
Extend test coverage for a recent fix.
* rs/xdiff-ignore-ws-w-func-context:
t4015: improve coverage of function context test
Diffstat (limited to 't')
-rwxr-xr-x | t/t4015-diff-whitespace.sh | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/t/t4015-diff-whitespace.sh b/t/t4015-diff-whitespace.sh index 65615e2fa9..88d3026894 100755 --- a/t/t4015-diff-whitespace.sh +++ b/t/t4015-diff-whitespace.sh @@ -2068,4 +2068,27 @@ test_expect_success 'combine --ignore-blank-lines with --function-context' ' test_cmp expect actual ' +test_expect_success 'combine --ignore-blank-lines with --function-context 2' ' + test_write_lines a b c "" function 1 2 3 4 5 "" 6 7 8 9 >a && + test_write_lines "" a b c "" function 1 2 3 4 5 6 7 8 >b && + test_must_fail git diff --no-index \ + --ignore-blank-lines --function-context a b >actual.raw && + sed -n "/@@/,\$p" <actual.raw >actual && + cat <<-\EOF >expect && + @@ -5,11 +6,9 @@ c + function + 1 + 2 + 3 + 4 + 5 + - + 6 + 7 + 8 + -9 + EOF + test_cmp expect actual +' + test_done |