summaryrefslogtreecommitdiff
path: root/tests/patch/parse.c
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2019-11-16 15:21:56 -0800
committerGitHub <noreply@github.com>2019-11-16 15:21:56 -0800
commit47dd665a62c3ac826277e6eda1287cf9291e8620 (patch)
treee8dfd1603fa2b46020ca347c761ca01fc71414f7 /tests/patch/parse.c
parentcb6bc6f25b3cc9f8b2ca029fea9bdecca1931107 (diff)
parentde7659ccc8cacc4d375e47021a1d634a931c78e7 (diff)
downloadlibgit2-47dd665a62c3ac826277e6eda1287cf9291e8620.tar.gz
Merge pull request #5303 from pks-t/pks/patch-path-in-body-only
patch_parse: use paths from "---"/"+++" lines for binary patches
Diffstat (limited to 'tests/patch/parse.c')
-rw-r--r--tests/patch/parse.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/patch/parse.c b/tests/patch/parse.c
index c18b63ab7..0c4eccc52 100644
--- a/tests/patch/parse.c
+++ b/tests/patch/parse.c
@@ -170,6 +170,20 @@ void test_patch_parse__binary_file_with_empty_quoted_paths(void)
strlen(PATCH_BINARY_FILE_WITH_QUOTED_EMPTY_PATHS), NULL));
}
+void test_patch_parse__binary_file_path_with_spaces(void)
+{
+ git_patch *patch;
+ cl_git_fail(git_patch_from_buffer(&patch, PATCH_BINARY_FILE_PATH_WITH_SPACES,
+ strlen(PATCH_BINARY_FILE_PATH_WITH_SPACES), NULL));
+}
+
+void test_patch_parse__binary_file_path_without_body_paths(void)
+{
+ git_patch *patch;
+ cl_git_fail(git_patch_from_buffer(&patch, PATCH_BINARY_FILE_PATH_WITHOUT_BODY_PATHS,
+ strlen(PATCH_BINARY_FILE_PATH_WITHOUT_BODY_PATHS), NULL));
+}
+
void test_patch_parse__memory_leak_on_multiple_paths(void)
{
git_patch *patch;