Skip to content

Commit 8e912e7

Browse files
committed
tests: try to init with empty template path
1 parent 15e1193 commit 8e912e7

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tests/repo/init.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,17 @@ void test_repo_init__sets_logAllRefUpdates_according_to_type_of_repository(void)
320320
assert_config_entry_on_init_bytype("core.logallrefupdates", true, false);
321321
}
322322

323+
void test_repo_init__empty_template_path(void)
324+
{
325+
git_repository_init_options opts = GIT_REPOSITORY_INIT_OPTIONS_INIT;
326+
opts.template_path = "";
327+
328+
cl_git_pass(git_futils_mkdir("foo", 0755, 0));
329+
cl_git_pass(git_repository_init_ext(&_repo, "foo", &opts));
330+
331+
cleanup_repository("foo");
332+
}
333+
323334
void test_repo_init__extended_0(void)
324335
{
325336
git_repository_init_options opts = GIT_REPOSITORY_INIT_OPTIONS_INIT;

0 commit comments

Comments
 (0)