summaryrefslogtreecommitdiff
path: root/tests/apply/apply_helpers.h
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2018-11-04 13:14:20 +0000
committerEdward Thomson <ethomson@edwardthomson.com>2018-11-05 15:53:59 +0000
commit07e71bfa08a87ae8ab9e58abf8c760bb100e885f (patch)
tree091bf79546dc167e06738ec4d1f201e078e4e851 /tests/apply/apply_helpers.h
parentdf4258ade061be35e8940bba27d2d80cdffed8df (diff)
downloadlibgit2-07e71bfa08a87ae8ab9e58abf8c760bb100e885f.tar.gz
apply: test multiple deltas to new file
Diffstat (limited to 'tests/apply/apply_helpers.h')
-rw-r--r--tests/apply/apply_helpers.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/apply/apply_helpers.h b/tests/apply/apply_helpers.h
index 964f16723..563a51d79 100644
--- a/tests/apply/apply_helpers.h
+++ b/tests/apply/apply_helpers.h
@@ -277,6 +277,23 @@
"-and serve it up.\n" \
"+and serve it up!\n"
+#define DIFF_TWO_DELTAS_ONE_NEW_FILE \
+ "diff --git a/newfile.txt b/newfile.txt\n" \
+ "new file mode 100644\n" \
+ "index 0000000..6434b13\n" \
+ "--- /dev/null\n" \
+ "+++ b/newfile.txt\n" \
+ "@@ -0,0 +1 @@\n" \
+ "+This is a new file.\n" \
+ "diff --git a/newfile.txt b/newfile.txt\n" \
+ "index 6434b13..08d4c44 100644\n" \
+ "--- a/newfile.txt\n" \
+ "+++ b/newfile.txt\n" \
+ "@@ -1 +1,3 @@\n" \
+ " This is a new file.\n" \
+ "+\n" \
+ "+This is another change to a new file.\n"
+
struct iterator_compare_data {
struct merge_index_entry *expected;
size_t cnt;