Skip to content

Commit

Permalink
repo::open: ensure we can open the repository
Browse files Browse the repository at this point in the history
Update the test cases to check the `git_repository_open` return code.
  • Loading branch information
ethomson committed Apr 3, 2020
1 parent dfd7fcc commit cb0cfc5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/repo/open.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ void test_repo_open__format_version_1(void)
git_config_free(config);
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__suffixcmp(git_repository_path(repo), "/") == 0);
git_repository_free(repo);
Expand All @@ -58,7 +58,7 @@ void test_repo_open__format_version_1_with_valid_extension(void)
git_config_free(config);
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__suffixcmp(git_repository_path(repo), "/") == 0);
git_repository_free(repo);
Expand Down

0 comments on commit cb0cfc5

Please sign in to comment.