]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/t4015-diff-whitespace.sh
Merge branch 'rs/xdiff-ignore-ws-w-func-context'
[thirdparty/git.git] / t / t4015-diff-whitespace.sh
index 65615e2fa961c7c5ac26f1294a8296c1d3df72d8..88d3026894f87f4d86cb6f4178898b6879630e73 100755 (executable)
@@ -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