summaryrefslogtreecommitdiff
path: root/tests/patch
diff options
context:
space:
mode:
Diffstat (limited to 'tests/patch')
-rw-r--r--tests/patch/patch_common.h6
-rw-r--r--tests/patch/print.c6
2 files changed, 12 insertions, 0 deletions
diff --git a/tests/patch/patch_common.h b/tests/patch/patch_common.h
index 92ab7692e..1c6ad7ea8 100644
--- a/tests/patch/patch_common.h
+++ b/tests/patch/patch_common.h
@@ -878,6 +878,12 @@
"index 27184d9..7c94f9e 100644\n" \
"Binary files a/binary.bin and b/binary.bin differ\n"
+#define PATCH_ADD_BINARY_NOT_PRINTED \
+ "diff --git a/test.bin b/test.bin\n" \
+ "new file mode 100644\n" \
+ "index 0000000..9e0f96a\n" \
+ "Binary files /dev/null and b/test.bin differ\n"
+
#define PATCH_ORIGINAL_NEW_FILE_WITH_SPACE \
"diff --git a/sp ace.txt b/sp ace.txt\n" \
"new file mode 100644\n" \
diff --git a/tests/patch/print.c b/tests/patch/print.c
index 4703c1d51..c4ff479e9 100644
--- a/tests/patch/print.c
+++ b/tests/patch/print.c
@@ -172,3 +172,9 @@ void test_patch_print__binary_not_shown(void)
patch_print_from_patchfile(PATCH_BINARY_NOT_PRINTED,
strlen(PATCH_BINARY_NOT_PRINTED));
}
+
+void test_patch_print__binary_add_not_shown(void)
+{
+ patch_print_from_patchfile(PATCH_ADD_BINARY_NOT_PRINTED,
+ strlen(PATCH_ADD_BINARY_NOT_PRINTED));
+}