summaryrefslogtreecommitdiff
path: root/tests-clay/repo/open.c
diff options
context:
space:
mode:
authorVicent Martí <tanoku@gmail.com>2012-01-24 20:35:15 -0800
committerVicent Martí <tanoku@gmail.com>2012-01-24 20:35:15 -0800
commit3fd1520cd4d8b4d6b6493a7d3dc393ffd9abf1db (patch)
tree51b29f5d8ffeb31ba751ab2a099e4f2a32d4be07 /tests-clay/repo/open.c
parenta9fe8ae0ee1ddcc289fad53f1a671f02a3e9a88f (diff)
downloadlibgit2-3fd1520cd4d8b4d6b6493a7d3dc393ffd9abf1db.tar.gz
Rename the Clay test suite to Clar
Clay is the name of a programming language on the makings, and we want to avoid confusions. Sorry for the huge diff!
Diffstat (limited to 'tests-clay/repo/open.c')
-rw-r--r--tests-clay/repo/open.c55
1 files changed, 0 insertions, 55 deletions
diff --git a/tests-clay/repo/open.c b/tests-clay/repo/open.c
deleted file mode 100644
index 05b01ceb2..000000000
--- a/tests-clay/repo/open.c
+++ /dev/null
@@ -1,55 +0,0 @@
-#include "clay_libgit2.h"
-#include "posix.h"
-
-void test_repo_open__bare_empty_repo(void)
-{
- git_repository *repo;
-
- cl_git_pass(git_repository_open(&repo, cl_fixture("empty_bare.git")));
- cl_assert(git_repository_path(repo) != NULL);
- cl_assert(git_repository_workdir(repo) == NULL);
-
- git_repository_free(repo);
-}
-
-void test_repo_open__standard_empty_repo(void)
-{
- git_repository *repo;
-
- cl_git_pass(git_repository_open(&repo, cl_fixture("empty_standard_repo/.gitted")));
- cl_assert(git_repository_path(repo) != NULL);
- cl_assert(git_repository_workdir(repo) != NULL);
-
- git_repository_free(repo);
-}
-
-/* TODO TODO */
-#if 0
-BEGIN_TEST(open2, "Open a bare repository with a relative path escaping out of the current working directory")
- char current_workdir[GIT_PATH_MAX];
- git_buf new_current_workdir = GIT_BUF_INIT;
- git_buf path_repository = GIT_BUF_INIT;
-
- const mode_t mode = 0777;
- git_repository* repo;
-
- /* Setup the repository to open */
- must_pass(p_getcwd(current_workdir, sizeof(current_workdir)));
- must_pass(git_buf_join_n(&path_repository, 3, current_workdir, TEMP_REPO_FOLDER, "a/d/e.git"));
- must_pass(copydir_recurs(REPOSITORY_FOLDER, path_repository.ptr));
- git_buf_free(&path_repository);
-
- /* Change the current working directory */
- must_pass(git_buf_joinpath(&new_current_workdir, TEMP_REPO_FOLDER, "a/b/c/"));
- must_pass(git_futils_mkdir_r(new_current_workdir.ptr, mode));
- must_pass(chdir(new_current_workdir.ptr));
- git_buf_free(&new_current_workdir);
-
- must_pass(git_repository_open(&repo, "../../d/e.git"));
-
- git_repository_free(repo);
-
- must_pass(chdir(current_workdir));
- must_pass(git_futils_rmdir_r(TEMP_REPO_FOLDER, 1));
-END_TEST
-#endif