diff options
Diffstat (limited to 'tests-clar/repo/init.c')
-rw-r--r-- | tests-clar/repo/init.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tests-clar/repo/init.c b/tests-clar/repo/init.c index a12a2c2fb..7f16b5b7c 100644 --- a/tests-clar/repo/init.c +++ b/tests-clar/repo/init.c @@ -141,3 +141,27 @@ void test_repo_init__reinit_too_recent_bare_repo(void) cl_fixture_cleanup("reinit.git"); } + +void test_repo_init__additional_templates(void) +{ + git_buf path = GIT_BUF_INIT; + + cl_set_cleanup(&cleanup_repository, "tester"); + + ensure_repository_init("tester", 0, "tester/.git/", "tester/"); + + cl_git_pass( + git_buf_joinpath(&path, git_repository_path(_repo), "description")); + cl_assert(git_path_isfile(git_buf_cstr(&path))); + + cl_git_pass( + git_buf_joinpath(&path, git_repository_path(_repo), "info/exclude")); + cl_assert(git_path_isfile(git_buf_cstr(&path))); + + cl_git_pass( + git_buf_joinpath(&path, git_repository_path(_repo), "hooks")); + cl_assert(git_path_isdir(git_buf_cstr(&path))); + /* won't confirm specific contents of hooks dir since it may vary */ + + git_buf_free(&path); +} |