push: further simplify the logic to assign rejection reason
[gitweb.git] / t / t4006-diff-mode.sh
index b85f622e7c4c934eeee826ac425be67376e27bde..3d4b1ba23f9eacec4e1bcd29345cc7d3943badce 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_i18ncmp expect actual
+'
+
+test_expect_success '--shortstat output after text chmod' '
+       git diff HEAD --shortstat >actual &&
+       test_i18ncmp 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_i18ncmp expect actual
+'
+
+test_expect_success '--shortstat output after binary chmod' '
+       git diff HEAD --shortstat >actual &&
+       test_i18ncmp expect actual
+'
+
 test_done