diff options
Diffstat (limited to 'tests/patch/parse.c')
-rw-r--r-- | tests/patch/parse.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/patch/parse.c b/tests/patch/parse.c index 0c4eccc52..3f89eb51a 100644 --- a/tests/patch/parse.c +++ b/tests/patch/parse.c @@ -184,6 +184,14 @@ void test_patch_parse__binary_file_path_without_body_paths(void) strlen(PATCH_BINARY_FILE_PATH_WITHOUT_BODY_PATHS), NULL)); } +void test_patch_parse__binary_file_with_truncated_delta(void) +{ + git_patch *patch; + cl_git_fail(git_patch_from_buffer(&patch, PATCH_BINARY_FILE_WITH_TRUNCATED_DELTA, + strlen(PATCH_BINARY_FILE_WITH_TRUNCATED_DELTA), NULL)); + cl_assert_equal_s(git_error_last()->message, "truncated binary data at line 5"); +} + void test_patch_parse__memory_leak_on_multiple_paths(void) { git_patch *patch; |