diff options
author | Russell Belfer <rb@github.com> | 2012-05-11 12:16:19 -0700 |
---|---|---|
committer | Russell Belfer <rb@github.com> | 2012-05-11 12:16:19 -0700 |
commit | db62807215cbe26b83a354954b7433aa5d90c149 (patch) | |
tree | 99fc84122c138e06d015d50e73d35fe977cddfb9 /tests-clar/repo/init.c | |
parent | dc34da6e8140c034c3673d0f82c896be9d66ef1c (diff) | |
download | libgit2-db62807215cbe26b83a354954b7433aa5d90c149.tar.gz |
Fixed leaks and added tests
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); +} |