Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2019-12-25 22:22:01 +0300
committerJunio C Hamano <gitster@pobox.com>2019-12-25 22:22:01 +0300
commitc0c6a7459410592a7c9ae95080e349015b890900 (patch)
treea936c6c800f754a6ab2c6912254ee6d33b4b0f7f /t/t4015-diff-whitespace.sh
parent45b96a6fa1ce2009f82d2ea1698b49fda0c11169 (diff)
parent124a895811fb22e89d41141e9c35a0eef7de1918 (diff)
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/t4015-diff-whitespace.sh')
-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