i18n: make warn_dangling_symref() automatically append \n
[gitweb.git] / t / t4031-diff-rewrite-binary.sh
index 7e7b307a24606131b4880817a0056af11973f3d2..c8296fa4fc1fbfe2645554d4818ae586d1cc2a14 100755 (executable)
@@ -44,6 +44,19 @@ test_expect_success 'rewrite diff can show binary patch' '
        grep "GIT binary patch" diff
 '
 
+test_expect_success 'rewrite diff --numstat shows binary changes' '
+       git diff -B --numstat --summary >diff &&
+       grep -e "-      -       " diff &&
+       grep " rewrite file" diff
+'
+
+test_expect_success 'diff --stat counts binary rewrite as 0 lines' '
+       git diff -B --stat --summary >diff &&
+       grep "Bin" diff &&
+       test_i18ngrep "0 insertions.*0 deletions" diff &&
+       grep " rewrite file" diff
+'
+
 {
        echo "#!$SHELL_PATH"
        cat <<'EOF'