summaryrefslogtreecommitdiff
path: root/tests/diff/binary.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/diff/binary.c')
-rw-r--r--tests/diff/binary.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/diff/binary.c b/tests/diff/binary.c
index 424a53e5f..90f2d5a06 100644
--- a/tests/diff/binary.c
+++ b/tests/diff/binary.c
@@ -1,5 +1,7 @@
#include "clar_libgit2.h"
+#include "git2/sys/diff.h"
+
#include "buffer.h"
#include "filebuf.h"
@@ -49,6 +51,11 @@ void test_patch(
cl_assert_equal_s(expected, actual.ptr);
+ git_buf_clear(&actual);
+ cl_git_pass(git_diff_print(diff, GIT_DIFF_FORMAT_PATCH, git_diff_print_callback__to_buf, &actual));
+
+ cl_assert_equal_s(expected, actual.ptr);
+
git_buf_free(&actual);
git_patch_free(patch);
git_diff_free(diff);