repository: ensure git_repository_open() returns ENOTFOUND when being passed a path leading to no repository

This commit is contained in:
nulltoken 2012-05-07 16:16:08 +02:00
parent 9abb5bca5d
commit d7d8a0bfd4

View File

@ -274,3 +274,9 @@ void test_repo_open__win32_path(void)
git_buf_free(&winpath);
#endif
}
void test_repo_open__opening_a_non_existing_repository_returns_ENOTFOUND(void)
{
git_repository *repo;
cl_assert_equal_i(GIT_ENOTFOUND, git_repository_open(&repo, "i-do-not/exist"));
}