Skip to content

Commit bc0d1ad

Browse files
committed
tests: try to init with non-existent template path
1 parent 709b1b6 commit bc0d1ad

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tests/repo/template.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,3 +293,13 @@ void test_repo_template__empty_template_path(void)
293293

294294
setup_repo("foo", &opts);
295295
}
296+
297+
void test_repo_template__nonexistent_template_path(void)
298+
{
299+
git_repository_init_options opts = GIT_REPOSITORY_INIT_OPTIONS_INIT;
300+
301+
opts.flags = GIT_REPOSITORY_INIT_MKPATH | GIT_REPOSITORY_INIT_EXTERNAL_TEMPLATE;
302+
opts.template_path = "/tmp/path/that/does/not/exist/for/libgit2/test";
303+
304+
setup_repo("bar", &opts);
305+
}

0 commit comments

Comments
 (0)