Commit 8e912e79b4fc894b6fdbebc2dcabe944fb9b938b

Ariel Davis 2017-06-16T21:05:58

tests: try to init with empty template path

diff --git a/tests/repo/init.c b/tests/repo/init.c
index 04d4a5c..6a455bf 100644
--- a/tests/repo/init.c
+++ b/tests/repo/init.c
@@ -320,6 +320,17 @@ void test_repo_init__sets_logAllRefUpdates_according_to_type_of_repository(void)
 	assert_config_entry_on_init_bytype("core.logallrefupdates", true, false);
 }
 
+void test_repo_init__empty_template_path(void)
+{
+	git_repository_init_options opts = GIT_REPOSITORY_INIT_OPTIONS_INIT;
+	opts.template_path = "";
+
+	cl_git_pass(git_futils_mkdir("foo", 0755, 0));
+	cl_git_pass(git_repository_init_ext(&_repo, "foo", &opts));
+
+	cleanup_repository("foo");
+}
+
 void test_repo_init__extended_0(void)
 {
 	git_repository_init_options opts = GIT_REPOSITORY_INIT_OPTIONS_INIT;