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
This commit is contained in:
commit
c0c6a74594
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user