gettext: add is_utf8_locale()
[gitweb.git] / t / t4014-format-patch.sh
index 2737ca63464193d79776790e14c1a215a0bca7ed..3b99434e3e6f534efe44850fef3d1d77c04f5856 100755 (executable)
@@ -1438,4 +1438,26 @@ test_expect_success 'format-patch --zero-commit' '
        test_cmp expect actual
 '
 
+test_expect_success 'From line has expected format' '
+       git format-patch --stdout v2..v1 >patch2 &&
+       grep "^From " patch2 >from &&
+       grep "^From $_x40 Mon Sep 17 00:00:00 2001$" patch2 >filtered &&
+       test_cmp from filtered
+'
+
+test_expect_success 'format-patch format.outputDirectory option' '
+       test_config format.outputDirectory patches &&
+       rm -fr patches &&
+       git format-patch master..side &&
+       test $(git rev-list master..side | wc -l) -eq $(ls patches | wc -l)
+'
+
+test_expect_success 'format-patch -o overrides format.outputDirectory' '
+       test_config format.outputDirectory patches &&
+       rm -fr patches patchset &&
+       git format-patch master..side -o patchset &&
+       test_path_is_missing patches &&
+       test_path_is_dir patchset
+'
+
 test_done