diff options
Diffstat (limited to '')
-rwxr-xr-x | t/t4101-apply-nonl.sh | 31 | ||||
-rw-r--r-- | t/t4101/diff.0-1 | 6 | ||||
-rw-r--r-- | t/t4101/diff.0-2 | 7 | ||||
-rw-r--r-- | t/t4101/diff.0-3 | 8 | ||||
-rw-r--r-- | t/t4101/diff.1-0 | 6 | ||||
-rw-r--r-- | t/t4101/diff.1-2 | 8 | ||||
-rw-r--r-- | t/t4101/diff.1-3 | 8 | ||||
-rw-r--r-- | t/t4101/diff.2-0 | 7 | ||||
-rw-r--r-- | t/t4101/diff.2-1 | 8 | ||||
-rw-r--r-- | t/t4101/diff.2-3 | 7 | ||||
-rw-r--r-- | t/t4101/diff.3-0 | 8 | ||||
-rw-r--r-- | t/t4101/diff.3-1 | 8 | ||||
-rw-r--r-- | t/t4101/diff.3-2 | 7 |
13 files changed, 119 insertions, 0 deletions
diff --git a/t/t4101-apply-nonl.sh b/t/t4101-apply-nonl.sh new file mode 100755 index 0000000..e3443d0 --- /dev/null +++ b/t/t4101-apply-nonl.sh @@ -0,0 +1,31 @@ +#!/bin/sh +# +# Copyright (c) 2005 Junio C Hamano +# + +test_description='git apply should handle files with incomplete lines. + +' +. ./test-lib.sh + +# setup + +(echo a; echo b) >frotz.0 +(echo a; echo b; echo c) >frotz.1 +(echo a; echo b | tr -d '\012') >frotz.2 +(echo a; echo c; echo b | tr -d '\012') >frotz.3 + +for i in 0 1 2 3 +do + for j in 0 1 2 3 + do + test $i -eq $j && continue + cat frotz.$i >frotz + test_expect_success "apply diff between $i and $j" ' + git apply <"$TEST_DIRECTORY"/t4101/diff.$i-$j && + test_cmp frotz.$j frotz + ' + done +done + +test_done diff --git a/t/t4101/diff.0-1 b/t/t4101/diff.0-1 new file mode 100644 index 0000000..1010a88 --- /dev/null +++ b/t/t4101/diff.0-1 @@ -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 index 0000000..36460a2 --- /dev/null +++ b/t/t4101/diff.0-2 @@ -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 index 0000000..b281c43 --- /dev/null +++ b/t/t4101/diff.0-3 @@ -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 index 0000000..f0a2e92 --- /dev/null +++ b/t/t4101/diff.1-0 @@ -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 index 0000000..2a440a5 --- /dev/null +++ b/t/t4101/diff.1-2 @@ -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 index 0000000..61aff97 --- /dev/null +++ b/t/t4101/diff.1-3 @@ -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 index 0000000..c2e71ee --- /dev/null +++ b/t/t4101/diff.2-0 @@ -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 index 0000000..a66d9fd --- /dev/null +++ b/t/t4101/diff.2-1 @@ -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 index 0000000..5633c83 --- /dev/null +++ b/t/t4101/diff.2-3 @@ -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 index 0000000..10b1a41 --- /dev/null +++ b/t/t4101/diff.3-0 @@ -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 index 0000000..c799c60 --- /dev/null +++ b/t/t4101/diff.3-1 @@ -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 index 0000000..f8d1ba6 --- /dev/null +++ b/t/t4101/diff.3-2 @@ -0,0 +1,7 @@ +--- a/frotz ++++ b/frotz +@@ -1,3 +1,2 @@ + a +-c + b +\ No newline at end of file |