Merge branch 'sb/test-cherry-pick-submodule-getting-in-a-way' into maint
[gitweb.git] / t / t4107-apply-ignore-whitespace.sh
index 9e29b5262d3f2e8514d5742951e28a3a339218dc..ac72eeaf27a9b925d801052fb3d051189c0a832a 100755 (executable)
@@ -178,4 +178,18 @@ test_expect_success 'patch5 fails (--no-ignore-whitespace)' '
        test_must_fail git apply --no-ignore-whitespace patch5.patch
 '
 
+test_expect_success 'apply --ignore-space-change --inaccurate-eof' '
+       echo 1 >file &&
+       git apply --ignore-space-change --inaccurate-eof <<-\EOF &&
+       diff --git a/file b/file
+       --- a/file
+       +++ b/file
+       @@ -1 +1 @@
+       -1
+       +2
+       EOF
+       printf 2 >expect &&
+       test_cmp expect file
+'
+
 test_done