summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2019-12-25 11:22:01 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2019-12-25 11:22:01 -0800
commitc0c6a7459410592a7c9ae95080e349015b890900 (patch)
treea936c6c800f754a6ab2c6912254ee6d33b4b0f7f /t
parentMerge branch 'js/add-p-in-c' (diff)
parentt4015: improve coverage of function context test (diff)
downloadtgif-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-xt/t4015-diff-whitespace.sh23
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