[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug-patch] [PATCH] Add another git-style diff concatenation regression
From: |
Dmitry V. Levin |
Subject: |
[bug-patch] [PATCH] Add another git-style diff concatenation regression test |
Date: |
Tue, 7 Aug 2012 14:45:51 +0400 |
* tests/concat-git-diff: Add a test case for erroneous file truncation.
---
tests/concat-git-diff | 38 ++++++++++++++++++++++++++++++++++++++
1 files changed, 38 insertions(+), 0 deletions(-)
diff --git a/tests/concat-git-diff b/tests/concat-git-diff
index 445fd97..158625a 100644
--- a/tests/concat-git-diff
+++ b/tests/concat-git-diff
@@ -45,3 +45,41 @@ EOF
check 'cat f' <<EOF
three
EOF
+
+cat > f <<EOF
+1
+2
+3
+EOF
+
+cat > concat2.diff <<EOF
+diff --git a/f b/f
+--- a/f
++++ b/f
+@@ -1,3 +1,4 @@
+ 1
+ 2
+ 3
++b
+diff --git a/f b/f
+--- a/f
++++ b/f
+@@ -1,3 +1,4 @@
++a
+ 1
+ 2
+ 3
+EOF
+
+check 'patch -p1 < concat2.diff || echo "Status: $?"' <<EOF
+patching file f
+patching file f
+EOF
+
+check 'cat f' <<EOF
+a
+1
+2
+3
+b
+EOF
--
ldv
- [bug-patch] [PATCH] Add another git-style diff concatenation regression test,
Dmitry V. Levin <=