Skip to content

Commit c0c6a74

Browse files
committed
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
2 parents 45b96a6 + 124a895 commit c0c6a74

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

t/t4015-diff-whitespace.sh

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2068,4 +2068,27 @@ test_expect_success 'combine --ignore-blank-lines with --function-context' '
20682068
test_cmp expect actual
20692069
'
20702070

2071+
test_expect_success 'combine --ignore-blank-lines with --function-context 2' '
2072+
test_write_lines a b c "" function 1 2 3 4 5 "" 6 7 8 9 >a &&
2073+
test_write_lines "" a b c "" function 1 2 3 4 5 6 7 8 >b &&
2074+
test_must_fail git diff --no-index \
2075+
--ignore-blank-lines --function-context a b >actual.raw &&
2076+
sed -n "/@@/,\$p" <actual.raw >actual &&
2077+
cat <<-\EOF >expect &&
2078+
@@ -5,11 +6,9 @@ c
2079+
function
2080+
1
2081+
2
2082+
3
2083+
4
2084+
5
2085+
-
2086+
6
2087+
7
2088+
8
2089+
-9
2090+
EOF
2091+
test_cmp expect actual
2092+
'
2093+
20712094
test_done

0 commit comments

Comments
 (0)