diff options
Diffstat (limited to 'tests/cherrypick/workdir.c')
-rw-r--r-- | tests/cherrypick/workdir.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/tests/cherrypick/workdir.c b/tests/cherrypick/workdir.c index 10e8c2d8b..f7765f2c2 100644 --- a/tests/cherrypick/workdir.c +++ b/tests/cherrypick/workdir.c @@ -1,7 +1,6 @@ #include "clar.h" #include "clar_libgit2.h" -#include "buffer.h" #include "futils.h" #include "git2/cherrypick.h" @@ -140,7 +139,7 @@ void test_cherrypick_workdir__conflicts(void) { git_commit *head = NULL, *commit = NULL; git_oid head_oid, cherry_oid; - git_buf conflicting_buf = GIT_BUF_INIT, mergemsg_buf = GIT_BUF_INIT; + git_str conflicting_buf = GIT_STR_INIT, mergemsg_buf = GIT_STR_INIT; struct merge_index_entry merge_index_entries[] = { { 0100644, "242e7977ba73637822ffb265b46004b9b0e5153b", 0, "file1.txt" }, @@ -168,7 +167,7 @@ void test_cherrypick_workdir__conflicts(void) cl_git_pass(git_futils_readbuffer(&mergemsg_buf, TEST_REPO_PATH "/.git/MERGE_MSG")); - cl_assert(strcmp(git_buf_cstr(&mergemsg_buf), + cl_assert(strcmp(git_str_cstr(&mergemsg_buf), "Change all files\n" \ "\n" \ "Conflicts:\n" \ @@ -178,7 +177,7 @@ void test_cherrypick_workdir__conflicts(void) cl_git_pass(git_futils_readbuffer(&conflicting_buf, TEST_REPO_PATH "/file2.txt")); - cl_assert(strcmp(git_buf_cstr(&conflicting_buf), + cl_assert(strcmp(git_str_cstr(&conflicting_buf), "!File 2\n" \ "File 2\n" \ "File 2\n" \ @@ -204,7 +203,7 @@ void test_cherrypick_workdir__conflicts(void) cl_git_pass(git_futils_readbuffer(&conflicting_buf, TEST_REPO_PATH "/file3.txt")); - cl_assert(strcmp(git_buf_cstr(&conflicting_buf), + cl_assert(strcmp(git_str_cstr(&conflicting_buf), "!File 3\n" \ "File 3\n" \ "File 3\n" \ @@ -228,8 +227,8 @@ void test_cherrypick_workdir__conflicts(void) git_commit_free(commit); git_commit_free(head); - git_buf_dispose(&mergemsg_buf); - git_buf_dispose(&conflicting_buf); + git_str_dispose(&mergemsg_buf); + git_str_dispose(&conflicting_buf); } /* git reset --hard bafbf6912c09505ac60575cd43d3f2aba3bd84d8 @@ -324,7 +323,7 @@ void test_cherrypick_workdir__both_renamed(void) { git_commit *head, *commit; git_oid head_oid, cherry_oid; - git_buf mergemsg_buf = GIT_BUF_INIT; + git_str mergemsg_buf = GIT_STR_INIT; git_cherrypick_options opts = GIT_CHERRYPICK_OPTIONS_INIT; struct merge_index_entry merge_index_entries[] = { @@ -350,7 +349,7 @@ void test_cherrypick_workdir__both_renamed(void) cl_git_pass(git_futils_readbuffer(&mergemsg_buf, TEST_REPO_PATH "/.git/MERGE_MSG")); - cl_assert(strcmp(git_buf_cstr(&mergemsg_buf), + cl_assert(strcmp(git_str_cstr(&mergemsg_buf), "Renamed file3.txt -> file3.txt.renamed\n" \ "\n" \ "Conflicts:\n" \ @@ -358,7 +357,7 @@ void test_cherrypick_workdir__both_renamed(void) "\tfile3.txt.renamed\n" \ "\tfile3.txt.renamed_on_branch\n") == 0); - git_buf_dispose(&mergemsg_buf); + git_str_dispose(&mergemsg_buf); git_commit_free(commit); git_commit_free(head); } |