summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Nader <jason.nader@protonmail.com>2021-11-05 03:08:43 +0900
committerJason Nader <jason.nader@protonmail.com>2021-11-12 14:59:43 +0900
commitbc0d1ad21e17a610dd484a8970cb2765ae8b6c8e (patch)
tree0aff08d92fe263d57e2c6c16c6d23ccd3954864b
parent709b1b62686d3526eb27169a4d80c0ed4e8f7e55 (diff)
downloadlibgit2-bc0d1ad21e17a610dd484a8970cb2765ae8b6c8e.tar.gz
tests: try to init with non-existent template path
-rw-r--r--tests/repo/template.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/repo/template.c b/tests/repo/template.c
index 6f369c6d6..99d4b6fd4 100644
--- a/tests/repo/template.c
+++ b/tests/repo/template.c
@@ -293,3 +293,13 @@ void test_repo_template__empty_template_path(void)
setup_repo("foo", &opts);
}
+
+void test_repo_template__nonexistent_template_path(void)
+{
+ git_repository_init_options opts = GIT_REPOSITORY_INIT_OPTIONS_INIT;
+
+ opts.flags = GIT_REPOSITORY_INIT_MKPATH | GIT_REPOSITORY_INIT_EXTERNAL_TEMPLATE;
+ opts.template_path = "/tmp/path/that/does/not/exist/for/libgit2/test";
+
+ setup_repo("bar", &opts);
+}