Add test cases for git-am
[gitweb.git] / t / t4104-apply-boundary.sh
index a5fb3ea40e4fde9126e66ed46fd3fc337b40ff66..e7e2913de745cc9f7639103757933f6238fdd564 100755 (executable)
@@ -3,7 +3,7 @@
 # Copyright (c) 2005 Junio C Hamano
 #
 
-test_description='git-apply boundary tests
+test_description='git apply boundary tests
 
 '
 . ./test-lib.sh
@@ -90,7 +90,7 @@ do
                                cat '"$kind-patch.$with"'
                                (exit 1)
                        } &&
-                       git diff '"$kind"'-expect victim
+                       test_cmp '"$kind"'-expect victim
                '
        done
 done
@@ -108,8 +108,21 @@ do
                        cat '"$kind-ng.without"'
                        (exit 1)
                } &&
-               git diff '"$kind"'-expect victim
+               test_cmp '"$kind"'-expect victim
        '
 done
 
+test_expect_success 'two lines' '
+
+       >file &&
+       git add file &&
+       echo aaa >file &&
+       git diff >patch &&
+       git add file &&
+       echo bbb >file &&
+       git add file &&
+       test_must_fail git apply --check patch
+
+'
+
 test_done