diff options
author | nulltoken <emeric.fermas@gmail.com> | 2012-01-25 12:35:25 +0100 |
---|---|---|
committer | nulltoken <emeric.fermas@gmail.com> | 2012-01-25 23:02:08 +0100 |
commit | 9b84447a806911bb93c67533b81f4d121e5ea3f1 (patch) | |
tree | a7d24d71a8eca06b2031b6baa0901012d29f59a9 /tests-clar/repo/open.c | |
parent | 911ff94eb9b545d6190a2a6e494b07a144345507 (diff) | |
download | libgit2-9b84447a806911bb93c67533b81f4d121e5ea3f1.tar.gz |
clay: migrate a test initializing a repository which path escapes the current working directory
A non migrated yet test has been removed as well as it's mostly redundant.
Diffstat (limited to 'tests-clar/repo/open.c')
-rw-r--r-- | tests-clar/repo/open.c | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/tests-clar/repo/open.c b/tests-clar/repo/open.c index 3bd103c27..b5002843c 100644 --- a/tests-clar/repo/open.c +++ b/tests-clar/repo/open.c @@ -22,34 +22,3 @@ void test_repo_open__standard_empty_repo(void) 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 |