test_cmp expected check
'
+test_expect_success 'prepare binary file' '
+ git commit -m rezrov &&
+ dd if=/dev/zero of=binbin bs=1024 count=1 &&
+ git add binbin &&
+ git commit -m binbin
+'
+
+test_expect_success '--stat output after text chmod' '
+ test_chmod -x rezrov &&
+ echo " 0 files changed" >expect &&
+ git diff HEAD --stat >actual &&
+ test_cmp expect actual
+'
+
+test_expect_success '--shortstat output after text chmod' '
+ git diff HEAD --shortstat >actual &&
+ test_cmp expect actual
+'
+
+test_expect_success '--stat output after binary chmod' '
+ test_chmod +x binbin &&
+ cat >expect <<-EOF &&
+ binbin | Bin 1024 -> 1024 bytes
+ 1 file changed, 0 insertions(+), 0 deletions(-)
+ EOF
+ git diff HEAD --stat >actual &&
+ test_cmp expect actual
+'
+
+test_expect_success '--shortstat output after binary chmod' '
+ cat >expect <<-EOF &&
+ 1 file changed, 0 insertions(+), 0 deletions(-)
+ EOF
+ git diff HEAD --shortstat >actual &&
+ test_cmp expect actual
+'
+
test_done