summaryrefslogtreecommitdiff
path: root/tests-clar/repo/init.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests-clar/repo/init.c')
-rw-r--r--tests-clar/repo/init.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/tests-clar/repo/init.c b/tests-clar/repo/init.c
index c0acbed5a..9ddb39545 100644
--- a/tests-clar/repo/init.c
+++ b/tests-clar/repo/init.c
@@ -365,9 +365,12 @@ void test_repo_init__extended_1(void)
void test_repo_init__extended_with_template(void)
{
+ git_buf expected = GIT_BUF_INIT;
+ git_buf actual = GIT_BUF_INIT;
+
git_repository_init_options opts = GIT_REPOSITORY_INIT_OPTIONS_INIT;
- opts.flags = GIT_REPOSITORY_INIT_MKPATH | GIT_REPOSITORY_INIT_BARE;
+ opts.flags = GIT_REPOSITORY_INIT_MKPATH | GIT_REPOSITORY_INIT_BARE | GIT_REPOSITORY_INIT_EXTERNAL_TEMPLATE;
opts.template_path = cl_fixture("template");
cl_git_pass(git_repository_init_ext(&_repo, "templated.git", &opts));
@@ -375,6 +378,14 @@ void test_repo_init__extended_with_template(void)
cl_assert(git_repository_is_bare(_repo));
cl_assert(!git__suffixcmp(git_repository_path(_repo), "/templated.git/"));
+ cl_assert(git_futils_readbuffer(&expected,cl_fixture("template/description")) == GIT_OK);
+ cl_assert(git_futils_readbuffer(&actual,"templated.git/description") == GIT_OK);
+
+ cl_assert(!git_buf_cmp(&expected,&actual));
+
+ git_buf_free(&expected);
+ git_buf_free(&actual);
+
cleanup_repository("templated.git");
}