]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/t4006-diff-mode.sh
Merge branch 'rs/checkout-no-overlay-pathspec-fix'
[thirdparty/git.git] / t / t4006-diff-mode.sh
index a8e01eccd158131118019ca7c9b05d08a65d07e3..03489aff14ea72921f66605eeac3ccddd694e923 100755 (executable)
@@ -32,28 +32,37 @@ test_expect_success 'prepare binary file' '
        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_expect_success '--stat output after text chmod' '
+       test_chmod -x rezrov &&
+       cat >expect <<-\EOF &&
+        rezrov | 0
+        1 file changed, 0 insertions(+), 0 deletions(-)
+       EOF
+       git diff HEAD --stat >actual &&
+       test_i18ncmp expect actual
+'
+
+test_expect_success '--shortstat output after text chmod' '
+       tail -n 1 <expect >expect.short &&
+       git diff HEAD --shortstat >actual &&
+       test_i18ncmp expect.short actual
+'
+
+test_expect_success '--stat output after binary chmod' '
+       test_chmod +x binbin &&
+       cat >expect <<-EOF &&
+        binbin | Bin
+        rezrov |   0
+        2 files changed, 0 insertions(+), 0 deletions(-)
+       EOF
+       git diff HEAD --stat >actual &&
+       test_i18ncmp expect actual
+'
+
+test_expect_success '--shortstat output after binary chmod' '
+       tail -n 1 <expect >expect.short &&
+       git diff HEAD --shortstat >actual &&
+       test_i18ncmp expect.short actual
+'
 
 test_done