]> Pileus Git - ~andy/git/blobdiff - t/t4006-diff-mode.sh
Merge branch 'tb/sanitize-decomposed-utf-8-pathname'
[~andy/git] / t / t4006-diff-mode.sh
index b85f622e7c4c934eeee826ac425be67376e27bde..7a3e1f9a24e4be3759c29acc632fc461ede2b74b 100755 (executable)
@@ -25,4 +25,35 @@ test_expect_success 'chmod' '
        test_cmp expected check
 '
 
+test_expect_success 'prepare binary file' '
+       git commit -m rezrov &&
+       printf "\00\01\02\03\04\05\06" >binbin &&
+       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 &&
+       echo " 0 files changed" >expect &&
+       git diff HEAD --stat >actual &&
+       test_cmp expect actual
+'
+
+test_expect_success '--shortstat output after binary chmod' '
+       git diff HEAD --shortstat >actual &&
+       test_cmp expect actual
+'
+
 test_done