File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -2068,4 +2068,27 @@ test_expect_success 'combine --ignore-blank-lines with --function-context' '
2068
2068
test_cmp expect actual
2069
2069
'
2070
2070
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
+
2071
2094
test_done
You can’t perform that action at this time.
0 commit comments