setup: set env $GIT_WORK_TREE when work tree is set, like $GIT_DIR
[git] / t / t4136-apply-check.sh
1 #!/bin/sh
2
3 test_description='git apply should exit non-zero with unrecognized input.'
4
5 . ./test-lib.sh
6
7 test_expect_success 'setup' '
8         test_commit 1
9 '
10
11 test_expect_success 'apply --check exits non-zero with unrecognized input' '
12         test_must_fail git apply --check - <<-\EOF
13         I am not a patch
14         I look nothing like a patch
15         git apply must fail
16         EOF
17 '
18
19 test_done