Commit cb0cfc5a by Edward Thomson

repo::open: ensure we can open the repository

Update the test cases to check the `git_repository_open` return code.
parent dfd7fcc4
...@@ -36,7 +36,7 @@ void test_repo_open__format_version_1(void) ...@@ -36,7 +36,7 @@ void test_repo_open__format_version_1(void)
git_config_free(config); git_config_free(config);
git_repository_free(repo); git_repository_free(repo);
git_repository_open(&repo, "empty_bare.git"); cl_git_pass(git_repository_open(&repo, "empty_bare.git"));
cl_assert(git_repository_path(repo) != NULL); cl_assert(git_repository_path(repo) != NULL);
cl_assert(git__suffixcmp(git_repository_path(repo), "/") == 0); cl_assert(git__suffixcmp(git_repository_path(repo), "/") == 0);
git_repository_free(repo); git_repository_free(repo);
...@@ -58,7 +58,7 @@ void test_repo_open__format_version_1_with_valid_extension(void) ...@@ -58,7 +58,7 @@ void test_repo_open__format_version_1_with_valid_extension(void)
git_config_free(config); git_config_free(config);
git_repository_free(repo); git_repository_free(repo);
git_repository_open(&repo, "empty_bare.git"); cl_git_pass(git_repository_open(&repo, "empty_bare.git"));
cl_assert(git_repository_path(repo) != NULL); cl_assert(git_repository_path(repo) != NULL);
cl_assert(git__suffixcmp(git_repository_path(repo), "/") == 0); cl_assert(git__suffixcmp(git_repository_path(repo), "/") == 0);
git_repository_free(repo); git_repository_free(repo);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment