Code

Make t4101-apply-nonl bring along its patches
authorDennis Stosberg <dennis@stosberg.net>
Sat, 17 Jun 2006 15:02:45 +0000 (17:02 +0200)
committerJunio C Hamano <junkio@cox.net>
Sat, 17 Jun 2006 23:06:21 +0000 (16:06 -0700)
Some versions of "diff" (e.g. on FreeBSD and older Linux systems) do
not support the "\ No newline at end of file" remark and are not
able to generate the patches needed for this test.  This lets the
test fail, although git-apply is working perfectly.  This patch adds
the pre-generated patches to t/t4100/ and makes the test use them.

Signed-off-by: Dennis Stosberg <dennis@stosberg.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
13 files changed:
t/t4101-apply-nonl.sh
t/t4101/diff.0-1 [new file with mode: 0644]
t/t4101/diff.0-2 [new file with mode: 0644]
t/t4101/diff.0-3 [new file with mode: 0644]
t/t4101/diff.1-0 [new file with mode: 0644]
t/t4101/diff.1-2 [new file with mode: 0644]
t/t4101/diff.1-3 [new file with mode: 0644]
t/t4101/diff.2-0 [new file with mode: 0644]
t/t4101/diff.2-1 [new file with mode: 0644]
t/t4101/diff.2-3 [new file with mode: 0644]
t/t4101/diff.3-0 [new file with mode: 0644]
t/t4101/diff.3-1 [new file with mode: 0644]
t/t4101/diff.3-2 [new file with mode: 0644]

index 26b131d0d5567a05e4ce7f386a06147e7b64fd88..026fac8c5534c5a269c1a89088bbe97a4dd30b87 100755 (executable)
@@ -20,14 +20,10 @@ do
   for j in 0 1 2 3
   do
     test $i -eq $j && continue
-    diff -u frotz.$i frotz.$j |
-    sed -e '
-       /^---/s|.*|--- a/frotz|
-       /^+++/s|.*|+++ b/frotz|' >diff.$i-$j
     cat frotz.$i >frotz
     test_expect_success \
         "apply diff between $i and $j" \
-       "git-apply <diff.$i-$j && diff frotz.$j frotz"
+       "git-apply <../t4101/diff.$i-$j && diff frotz.$j frotz"
   done
 done
 
diff --git a/t/t4101/diff.0-1 b/t/t4101/diff.0-1
new file mode 100644 (file)
index 0000000..1010a88
--- /dev/null
@@ -0,0 +1,6 @@
+--- a/frotz
++++ b/frotz
+@@ -1,2 +1,3 @@
+ a
+ b
++c
diff --git a/t/t4101/diff.0-2 b/t/t4101/diff.0-2
new file mode 100644 (file)
index 0000000..36460a2
--- /dev/null
@@ -0,0 +1,7 @@
+--- a/frotz
++++ b/frotz
+@@ -1,2 +1,2 @@
+ a
+-b
++b
+\ No newline at end of file
diff --git a/t/t4101/diff.0-3 b/t/t4101/diff.0-3
new file mode 100644 (file)
index 0000000..b281c43
--- /dev/null
@@ -0,0 +1,8 @@
+--- a/frotz
++++ b/frotz
+@@ -1,2 +1,3 @@
+ a
+-b
++c
++b
+\ No newline at end of file
diff --git a/t/t4101/diff.1-0 b/t/t4101/diff.1-0
new file mode 100644 (file)
index 0000000..f0a2e92
--- /dev/null
@@ -0,0 +1,6 @@
+--- a/frotz
++++ b/frotz
+@@ -1,3 +1,2 @@
+ a
+ b
+-c
diff --git a/t/t4101/diff.1-2 b/t/t4101/diff.1-2
new file mode 100644 (file)
index 0000000..2a440a5
--- /dev/null
@@ -0,0 +1,8 @@
+--- a/frotz
++++ b/frotz
+@@ -1,3 +1,2 @@
+ a
+-b
+-c
++b
+\ No newline at end of file
diff --git a/t/t4101/diff.1-3 b/t/t4101/diff.1-3
new file mode 100644 (file)
index 0000000..61aff97
--- /dev/null
@@ -0,0 +1,8 @@
+--- a/frotz
++++ b/frotz
+@@ -1,3 +1,3 @@
+ a
+-b
+ c
++b
+\ No newline at end of file
diff --git a/t/t4101/diff.2-0 b/t/t4101/diff.2-0
new file mode 100644 (file)
index 0000000..c2e71ee
--- /dev/null
@@ -0,0 +1,7 @@
+--- a/frotz
++++ b/frotz
+@@ -1,2 +1,2 @@
+ a
+-b
+\ No newline at end of file
++b
diff --git a/t/t4101/diff.2-1 b/t/t4101/diff.2-1
new file mode 100644 (file)
index 0000000..a66d9fd
--- /dev/null
@@ -0,0 +1,8 @@
+--- a/frotz
++++ b/frotz
+@@ -1,2 +1,3 @@
+ a
+-b
+\ No newline at end of file
++b
++c
diff --git a/t/t4101/diff.2-3 b/t/t4101/diff.2-3
new file mode 100644 (file)
index 0000000..5633c83
--- /dev/null
@@ -0,0 +1,7 @@
+--- a/frotz
++++ b/frotz
+@@ -1,2 +1,3 @@
+ a
++c
+ b
+\ No newline at end of file
diff --git a/t/t4101/diff.3-0 b/t/t4101/diff.3-0
new file mode 100644 (file)
index 0000000..10b1a41
--- /dev/null
@@ -0,0 +1,8 @@
+--- a/frotz
++++ b/frotz
+@@ -1,3 +1,2 @@
+ a
+-c
+-b
+\ No newline at end of file
++b
diff --git a/t/t4101/diff.3-1 b/t/t4101/diff.3-1
new file mode 100644 (file)
index 0000000..c799c60
--- /dev/null
@@ -0,0 +1,8 @@
+--- a/frotz
++++ b/frotz
+@@ -1,3 +1,3 @@
+ a
++b
+ c
+-b
+\ No newline at end of file
diff --git a/t/t4101/diff.3-2 b/t/t4101/diff.3-2
new file mode 100644 (file)
index 0000000..f8d1ba6
--- /dev/null
@@ -0,0 +1,7 @@
+--- a/frotz
++++ b/frotz
+@@ -1,3 +1,2 @@
+ a
+-c
+ b
+\ No newline at end of file