diff options
author | Jason Nader <jason.nader@protonmail.com> | 2021-11-05 03:08:43 +0900 |
---|---|---|
committer | Jason Nader <jason.nader@protonmail.com> | 2021-11-12 14:59:43 +0900 |
commit | bc0d1ad21e17a610dd484a8970cb2765ae8b6c8e (patch) | |
tree | 0aff08d92fe263d57e2c6c16c6d23ccd3954864b | |
parent | 709b1b62686d3526eb27169a4d80c0ed4e8f7e55 (diff) | |
download | libgit2-bc0d1ad21e17a610dd484a8970cb2765ae8b6c8e.tar.gz |
tests: try to init with non-existent template path
-rw-r--r-- | tests/repo/template.c | 10 |
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); +} |