git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Add a test-case for git-apply trying to add an ending line
@ 2006-05-23 21:48 Catalin Marinas
  2006-05-24  0:31 ` Junio C Hamano
  0 siblings, 1 reply; 9+ messages in thread
From: Catalin Marinas @ 2006-05-23 21:48 UTC (permalink / raw)
  To: git

From: Catalin Marinas <catalin.marinas@gmail.com>

git-apply adding an ending line doesn't seem to fail if the ending line is
already present in the patched file.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
---

 t/t4113-apply-ending.sh |   35 +++++++++++++++++++++++++++++++++++
 1 files changed, 35 insertions(+), 0 deletions(-)

diff --git a/t/t4113-apply-ending.sh b/t/t4113-apply-ending.sh
new file mode 100755
index 0000000..d021ae8
--- /dev/null
+++ b/t/t4113-apply-ending.sh
@@ -0,0 +1,35 @@
+#!/bin/sh
+#
+# Copyright (c) 2006 Catalin Marinas
+#
+
+test_description='git-apply trying to add an ending line.
+
+'
+. ./test-lib.sh
+
+# setup
+
+cat >test-patch <<\EOF
+diff --git a/file b/file
+--- a/file
++++ b/file
+@@ -1,2 +1,3 @@
+ a
+ b
++c
+EOF
+
+echo 'a' >file
+echo 'b' >>file
+echo 'c' >>file
+
+test_expect_success setup \
+    'git-update-index --add file'
+
+# test
+
+test_expect_failure apply \
+    'git-apply --index test-patch'
+
+test_done

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2006-05-24 14:50 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-23 21:48 [PATCH] Add a test-case for git-apply trying to add an ending line Catalin Marinas
2006-05-24  0:31 ` Junio C Hamano
2006-05-24  1:09   ` Junio C Hamano
2006-05-24  1:09   ` Junio C Hamano
2006-05-24  2:08     ` Linus Torvalds
2006-05-24  2:17       ` Linus Torvalds
2006-05-24  4:59       ` Junio C Hamano
2006-05-24 13:32         ` Catalin Marinas
2006-05-24 14:49         ` Linus Torvalds

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).