repository: ensure git_repository_open() returns ENOTFOUND when being passed a path leading to no repository
diff --git a/tests-clar/repo/open.c b/tests-clar/repo/open.c
index 1813887..91443e8 100644
--- a/tests-clar/repo/open.c
+++ b/tests-clar/repo/open.c
@@ -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"));
+}
\ No newline at end of file