diff options
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)); |