[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug-patch] [PATCH] Add regression test for binary file deletion
From: |
Dmitry V. Levin |
Subject: |
[bug-patch] [PATCH] Add regression test for binary file deletion |
Date: |
Mon, 24 Sep 2012 19:10:38 +0400 |
* tests/create-delete: Add test case for binary file deletion.
---
This test demonstrates a regression introduced by commit v2.7-3-g281537b.
tests/create-delete | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/tests/create-delete b/tests/create-delete
index 7eed11f..7267211 100644
--- a/tests/create-delete
+++ b/tests/create-delete
@@ -214,3 +214,19 @@ ncheck 'test ! -e target'
check 'cat target.orig' <<EOF
data
EOF
+
+# This test deletes the target binary file.
+
+printf '\0' > target
+cat > p.diff <<EOF
+diff --git a/target b/target
+deleted file mode 100644
+index f76dd23..0000000
+Binary files a/target and /dev/null differ
+EOF
+
+check 'patch -p1 < p.diff || echo status: $?' <<EOF
+patching file target
+EOF
+
+ncheck 'test ! -e target'
--
ldv