summaryrefslogtreecommitdiff
path: root/t/t4031-diff-rewrite-binary.sh
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2012-04-15 22:51:24 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2012-04-15 22:51:24 -0700
commit09b90fb3c065ac5ac2ad051596b036131ecedbd5 (patch)
tree687a072364d6ac26ce8459416341b8fc5db9364b /t/t4031-diff-rewrite-binary.sh
parentMerge branch 'jc/diff-algo-cleanup' (diff)
parentdiffstat summary line varies by locale: miscellany (diff)
downloadtgif-09b90fb3c065ac5ac2ad051596b036131ecedbd5.tar.xz
Merge branch 'jn/diffstat-tests'
Some tests checked the "diff --stat" output when they do not have to, which unnecessarily made things harder to verify under GETTEXT_POISON. By Jonathan Nieder * jn/diffstat-tests: diffstat summary line varies by locale: miscellany test: use numstat instead of diffstat in binary-diff test test: use --numstat instead of --stat in "git stash show" tests test: test cherry-pick functionality and output separately test: modernize funny-names test style test: use numstat instead of diffstat in funny-names test test: use test_i18ncmp when checking --stat output
Diffstat (limited to 't/t4031-diff-rewrite-binary.sh')
-rwxr-xr-xt/t4031-diff-rewrite-binary.sh10
1 files changed, 8 insertions, 2 deletions
diff --git a/t/t4031-diff-rewrite-binary.sh b/t/t4031-diff-rewrite-binary.sh
index 7d7470f21b..c8296fa4fc 100755
--- a/t/t4031-diff-rewrite-binary.sh
+++ b/t/t4031-diff-rewrite-binary.sh
@@ -44,10 +44,16 @@ test_expect_success 'rewrite diff can show binary patch' '
grep "GIT binary patch" diff
'
-test_expect_success 'rewrite diff --stat shows binary changes' '
+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 &&
- grep "0 insertions.*0 deletions" diff &&
+ test_i18ngrep "0 insertions.*0 deletions" diff &&
grep " rewrite file" diff
'