hashmap: add string interning API
[gitweb.git] / t / t4000-diff-format.sh
index 2b5dffc3c4d4bdd3f36a18f819875fe43ce0f91e..8de36b7d12227a38769f658983363a5ebd52fd68 100755 (executable)
@@ -59,4 +59,34 @@ test_expect_success 'validate git diff-files -p output.' '
        compare_diff_patch expected actual
 '
 
+test_expect_success 'git diff-files -s after editing work tree' '
+       git diff-files -s >actual 2>err &&
+       test_must_be_empty actual &&
+       test_must_be_empty err
+'
+
+test_expect_success 'git diff-files --no-patch as synonym for -s' '
+       git diff-files --no-patch >actual 2>err &&
+       test_must_be_empty actual &&
+       test_must_be_empty err
+'
+
+test_expect_success 'git diff-files --no-patch --patch shows the patch' '
+       git diff-files --no-patch --patch >actual &&
+       compare_diff_patch expected actual
+'
+
+test_expect_success 'git diff-files --no-patch --patch-with-raw shows the patch and raw data' '
+       git diff-files --no-patch --patch-with-raw >actual &&
+       grep -q "^:100644 100755 .* 0000000000000000000000000000000000000000 M  path0\$" actual &&
+       tail -n +4 actual >actual-patch &&
+       compare_diff_patch expected actual-patch
+'
+
+test_expect_success 'git diff-files --patch --no-patch does not show the patch' '
+       git diff-files --patch --no-patch >actual 2>err &&
+       test_must_be_empty actual &&
+       test_must_be_empty err
+'
+
 test_done