3 test_description
='git apply should exit non-zero with unrecognized input.'
6 TEST_PASSES_SANITIZE_LEAK
=true
9 test_expect_success
'setup' '
13 test_expect_success
'apply --check exits non-zero with unrecognized input' '
14 test_must_fail git apply --check - <<-\EOF
16 I look nothing like a patch
21 test_expect_success
'apply exits non-zero with no-op patch' '
24 index 6696ea4..606eddd 100644
30 test_must_fail git apply --stat input &&
31 test_must_fail git apply --check input
34 test_expect_success
'`apply --recount` allows no-op patch' '
36 git apply --recount --check <<-\EOF
38 index 6696ea4..606eddd 100644
46 test_expect_success
'invalid combination: create and copy' '
47 test_must_fail git apply --check - <<-\EOF
55 test_expect_success
'invalid combination: create and rename' '
56 test_must_fail git apply --check - <<-\EOF