summaryrefslogtreecommitdiff
path: root/tests/rebase
diff options
context:
space:
mode:
Diffstat (limited to 'tests/rebase')
-rw-r--r--tests/rebase/sign.c14
-rw-r--r--tests/rebase/submodule.c8
2 files changed, 12 insertions, 10 deletions
diff --git a/tests/rebase/sign.c b/tests/rebase/sign.c
index 06c18937a..dc99407dd 100644
--- a/tests/rebase/sign.c
+++ b/tests/rebase/sign.c
@@ -263,8 +263,8 @@ int signing_cb_passthrough(
const char *commit_content,
void *payload)
{
- cl_assert_equal_b(false, git_buf_is_allocated(signature));
- cl_assert_equal_b(false, git_buf_is_allocated(signature_field));
+ cl_assert_equal_i(0, signature->size);
+ cl_assert_equal_i(0, signature_field->size);
cl_assert_equal_s(expected_commit_content, commit_content);
cl_assert_equal_p(NULL, payload);
return GIT_PASSTHROUGH;
@@ -342,8 +342,8 @@ cttVRsdOoego+fiy08eFE+aJIeYiINRGhqOBTsuqG4jIdpdKxPE=\n\
=KbsY\n\
-----END PGP SIGNATURE-----";
- cl_assert_equal_b(false, git_buf_is_allocated(signature));
- cl_assert_equal_b(false, git_buf_is_allocated(signature_field));
+ cl_assert_equal_i(0, signature->size);
+ cl_assert_equal_i(0, signature_field->size);
cl_assert_equal_s(expected_commit_content, commit_content);
cl_assert_equal_p(NULL, payload);
@@ -426,8 +426,10 @@ int signing_cb_magic_field(
const char *signature_content = "magic word: pretty please";
const char *signature_field_content = "magicsig";
- cl_assert_equal_b(false, git_buf_is_allocated(signature));
- cl_assert_equal_b(false, git_buf_is_allocated(signature_field));
+ cl_assert_equal_p(NULL, signature->ptr);
+ cl_assert_equal_i(0, signature->size);
+ cl_assert_equal_p(NULL, signature_field->ptr);
+ cl_assert_equal_i(0, signature_field->size);
cl_assert_equal_s(expected_commit_content, commit_content);
cl_assert_equal_p(NULL, payload);
diff --git a/tests/rebase/submodule.c b/tests/rebase/submodule.c
index a28b3f4b2..0b3c2d5b5 100644
--- a/tests/rebase/submodule.c
+++ b/tests/rebase/submodule.c
@@ -65,7 +65,7 @@ void test_rebase_submodule__init_untracked(void)
git_rebase *rebase;
git_reference *branch_ref, *upstream_ref;
git_annotated_commit *branch_head, *upstream_head;
- git_buf untracked_path = GIT_BUF_INIT;
+ git_str untracked_path = GIT_STR_INIT;
FILE *fp;
git_submodule *submodule;
@@ -78,11 +78,11 @@ void test_rebase_submodule__init_untracked(void)
cl_git_pass(git_submodule_lookup(&submodule, repo, "my-submodule"));
cl_git_pass(git_submodule_update(submodule, 1, NULL));
- git_buf_printf(&untracked_path, "%s/my-submodule/untracked", git_repository_workdir(repo));
- fp = fopen(git_buf_cstr(&untracked_path), "w");
+ git_str_printf(&untracked_path, "%s/my-submodule/untracked", git_repository_workdir(repo));
+ fp = fopen(git_str_cstr(&untracked_path), "w");
fprintf(fp, "An untracked file in a submodule should not block a rebase\n");
fclose(fp);
- git_buf_dispose(&untracked_path);
+ git_str_dispose(&untracked_path);
cl_git_pass(git_rebase_init(&rebase, repo, branch_head, upstream_head, NULL, NULL));