diff options
author | Carlos Martín Nieto <carlos@cmartin.tk> | 2011-11-18 22:45:56 +0100 |
---|---|---|
committer | Carlos Martín Nieto <carlos@cmartin.tk> | 2011-11-18 22:45:56 +0100 |
commit | bdd31dd5e832126b2f22fccbe244a1106c241ab0 (patch) | |
tree | b08a2ad0fad57131563aa8c071221bea241128c1 /tests/t12-repo.c | |
parent | 277b7efe493887081ce1dafd91199d0ee9f676c9 (diff) | |
parent | e4c93a392763a006d11e1c1dd01c12f85498dad5 (diff) | |
download | libgit2-error-handling.tar.gz |
Merge branch 'development' into error-handlingerror-handling
The code in this branch has been modified so it works with the global
state introduced in development.
Diffstat (limited to 'tests/t12-repo.c')
-rw-r--r-- | tests/t12-repo.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/tests/t12-repo.c b/tests/t12-repo.c index de921f9ca..47dc852f3 100644 --- a/tests/t12-repo.c +++ b/tests/t12-repo.c @@ -173,7 +173,7 @@ END_TEST BEGIN_TEST(init2, "Initialize and open a bare repo with a relative path escaping out of the current working directory") char path_repository[GIT_PATH_MAX]; char current_workdir[GIT_PATH_MAX]; - const int mode = 0755; /* or 0777 ? */ + const mode_t mode = 0777; git_repository* repo; must_pass(p_getcwd(current_workdir, sizeof(current_workdir))); @@ -232,7 +232,7 @@ BEGIN_TEST(open2, "Open a bare repository with a relative path escaping out of t char current_workdir[GIT_PATH_MAX]; char path_repository[GIT_PATH_MAX]; - const int mode = 0755; /* or 0777 ? */ + const mode_t mode = 0777; git_repository* repo; /* Setup the repository to open */ @@ -286,6 +286,8 @@ BEGIN_TEST(detached0, "test if HEAD is detached") must_be_true(git_repository_head_detached(repo) == 0); git_repository_free(repo); + + git_reference_free(ref); END_TEST BEGIN_TEST(orphan0, "test if HEAD is orphan") @@ -305,6 +307,8 @@ BEGIN_TEST(orphan0, "test if HEAD is orphan") must_be_true(git_repository_head_orphan(repo) == 0); git_repository_free(repo); + + git_reference_free(ref); END_TEST #define DISCOVER_FOLDER TEMP_REPO_FOLDER "discover.git" @@ -351,7 +355,7 @@ static int write_file(const char *path, const char *content) return error; } - file = git_futils_creat_withpath(path, 0644); + file = git_futils_creat_withpath(path, 0777, 0666); if (file < GIT_SUCCESS) return file; @@ -384,7 +388,7 @@ BEGIN_TEST(discover0, "test discover") char repository_path[GIT_PATH_MAX]; char sub_repository_path[GIT_PATH_MAX]; char found_path[GIT_PATH_MAX]; - int mode = 0755; + const mode_t mode = 0777; git_futils_mkdir_r(DISCOVER_FOLDER, mode); must_pass(append_ceiling_dir(ceiling_dirs, TEMP_REPO_FOLDER)); |