diff options
Diffstat (limited to 'tests-clar')
| -rw-r--r-- | tests-clar/config/stress.c | 4 | ||||
| -rw-r--r-- | tests-clar/core/filebuf.c | 20 | ||||
| -rw-r--r-- | tests-clar/index/tests.c | 6 | ||||
| -rw-r--r-- | tests-clar/odb/alternates.c | 4 |
4 files changed, 17 insertions, 17 deletions
diff --git a/tests-clar/config/stress.c b/tests-clar/config/stress.c index 8cc64d23c..eeca54ff4 100644 --- a/tests-clar/config/stress.c +++ b/tests-clar/config/stress.c @@ -10,12 +10,12 @@ void test_config_stress__initialize(void) { git_filebuf file = GIT_FILEBUF_INIT; - cl_git_pass(git_filebuf_open(&file, TEST_CONFIG, 0)); + cl_git_pass(git_filebuf_open(&file, TEST_CONFIG, 0, 0666)); git_filebuf_printf(&file, "[color]\n\tui = auto\n"); git_filebuf_printf(&file, "[core]\n\teditor = \n"); - cl_git_pass(git_filebuf_commit(&file, 0666)); + cl_git_pass(git_filebuf_commit(&file)); } void test_config_stress__cleanup(void) diff --git a/tests-clar/core/filebuf.c b/tests-clar/core/filebuf.c index 646d42c6e..5a3e7510f 100644 --- a/tests-clar/core/filebuf.c +++ b/tests-clar/core/filebuf.c @@ -13,7 +13,7 @@ void test_core_filebuf__0(void) cl_must_pass(fd); cl_must_pass(p_close(fd)); - cl_git_fail(git_filebuf_open(&file, test, 0)); + cl_git_fail(git_filebuf_open(&file, test, 0, 0666)); cl_assert(git_path_exists(testlock)); cl_must_pass(p_unlink(testlock)); @@ -28,9 +28,9 @@ void test_core_filebuf__1(void) cl_git_mkfile(test, "libgit2 rocks\n"); - cl_git_pass(git_filebuf_open(&file, test, GIT_FILEBUF_APPEND)); + cl_git_pass(git_filebuf_open(&file, test, GIT_FILEBUF_APPEND, 0666)); cl_git_pass(git_filebuf_printf(&file, "%s\n", "libgit2 rocks")); - cl_git_pass(git_filebuf_commit(&file, 0666)); + cl_git_pass(git_filebuf_commit(&file)); cl_assert_equal_file("libgit2 rocks\nlibgit2 rocks\n", 0, test); @@ -47,9 +47,9 @@ void test_core_filebuf__2(void) memset(buf, 0xfe, sizeof(buf)); - cl_git_pass(git_filebuf_open(&file, test, 0)); + cl_git_pass(git_filebuf_open(&file, test, 0, 0666)); cl_git_pass(git_filebuf_write(&file, buf, sizeof(buf))); - cl_git_pass(git_filebuf_commit(&file, 0666)); + cl_git_pass(git_filebuf_commit(&file)); cl_assert_equal_file((char *)buf, sizeof(buf), test); @@ -64,7 +64,7 @@ void test_core_filebuf__4(void) cl_assert(file.buffer == NULL); - cl_git_pass(git_filebuf_open(&file, test, 0)); + cl_git_pass(git_filebuf_open(&file, test, 0, 0666)); cl_assert(file.buffer != NULL); git_filebuf_cleanup(&file); @@ -80,12 +80,12 @@ void test_core_filebuf__5(void) cl_assert(file.buffer == NULL); - cl_git_pass(git_filebuf_open(&file, test, 0)); + cl_git_pass(git_filebuf_open(&file, test, 0, 0666)); cl_assert(file.buffer != NULL); cl_git_pass(git_filebuf_printf(&file, "%s\n", "libgit2 rocks")); cl_assert(file.buffer != NULL); - cl_git_pass(git_filebuf_commit(&file, 0666)); + cl_git_pass(git_filebuf_commit(&file)); cl_assert(file.buffer == NULL); cl_must_pass(p_unlink(test)); @@ -110,12 +110,12 @@ void test_core_filebuf__umask(void) cl_assert(file.buffer == NULL); - cl_git_pass(git_filebuf_open(&file, test, 0)); + cl_git_pass(git_filebuf_open(&file, test, 0, 0666)); cl_assert(file.buffer != NULL); cl_git_pass(git_filebuf_printf(&file, "%s\n", "libgit2 rocks")); cl_assert(file.buffer != NULL); - cl_git_pass(git_filebuf_commit(&file, 0666)); + cl_git_pass(git_filebuf_commit(&file)); cl_assert(file.buffer == NULL); cl_must_pass(p_stat("test", &statbuf)); diff --git a/tests-clar/index/tests.c b/tests-clar/index/tests.c index 09b05bf6e..e5202980c 100644 --- a/tests-clar/index/tests.c +++ b/tests-clar/index/tests.c @@ -224,9 +224,9 @@ void test_index_tests__add(void) /* Create a new file in the working directory */ cl_git_pass(git_futils_mkpath2file("myrepo/test.txt", 0777)); - cl_git_pass(git_filebuf_open(&file, "myrepo/test.txt", 0)); + cl_git_pass(git_filebuf_open(&file, "myrepo/test.txt", 0, 0666)); cl_git_pass(git_filebuf_write(&file, "hey there\n", 10)); - cl_git_pass(git_filebuf_commit(&file, 0666)); + cl_git_pass(git_filebuf_commit(&file)); /* Store the expected hash of the file/blob * This has been generated by executing the following @@ -474,7 +474,7 @@ void test_index_tests__elocked(void) cl_git_pass(git_repository_index(&index, repo)); /* Lock the index file so we fail to lock it */ - cl_git_pass(git_filebuf_open(&file, index->index_file_path, 0)); + cl_git_pass(git_filebuf_open(&file, index->index_file_path, 0, 0666)); error = git_index_write(index); cl_assert_equal_i(GIT_ELOCKED, error); diff --git a/tests-clar/odb/alternates.c b/tests-clar/odb/alternates.c index 4e876c2b3..c75f6feaa 100644 --- a/tests-clar/odb/alternates.c +++ b/tests-clar/odb/alternates.c @@ -32,9 +32,9 @@ static void init_linked_repo(const char *path, const char *alternate) cl_git_pass(git_futils_mkdir(filepath.ptr, NULL, 0755, GIT_MKDIR_PATH)); cl_git_pass(git_buf_joinpath(&filepath, filepath.ptr , "alternates")); - cl_git_pass(git_filebuf_open(&file, git_buf_cstr(&filepath), 0)); + cl_git_pass(git_filebuf_open(&file, git_buf_cstr(&filepath), 0, 0666)); git_filebuf_printf(&file, "%s\n", git_buf_cstr(&destpath)); - cl_git_pass(git_filebuf_commit(&file, 0644)); + cl_git_pass(git_filebuf_commit(&file)); git_repository_free(repo); } |
