diff options
author | Junio C Hamano <gitster@pobox.com> | 2011-12-13 22:56:22 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-12-13 22:56:22 -0800 |
commit | b661a4bc1e172a9c67bf62bdc2715bd4efbc16e5 (patch) | |
tree | 5104d722f0547044c3f129bc49f866aa7498d114 /t | |
parent | 424f30a5ae3ff26fca14df71cce31b06d1dec919 (diff) | |
parent | cc64b318f26c9e176c4f07b1a459a86e7a04c4eb (diff) | |
download | git-b661a4bc1e172a9c67bf62bdc2715bd4efbc16e5.tar.gz git-b661a4bc1e172a9c67bf62bdc2715bd4efbc16e5.tar.xz |
Merge branch 'bc/maint-apply-check-no-patch'
* bc/maint-apply-check-no-patch:
builtin/apply.c: report error on failure to recognize input
t/t4131-apply-fake-ancestor.sh: fix broken test
Diffstat (limited to 't')
-rwxr-xr-x | t/t4131-apply-fake-ancestor.sh | 2 | ||||
-rwxr-xr-x | t/t4136-apply-check.sh | 19 |
2 files changed, 20 insertions, 1 deletions
diff --git a/t/t4131-apply-fake-ancestor.sh b/t/t4131-apply-fake-ancestor.sh index 94373ca9a..b1361ce54 100755 --- a/t/t4131-apply-fake-ancestor.sh +++ b/t/t4131-apply-fake-ancestor.sh @@ -11,7 +11,7 @@ test_expect_success 'setup' ' test_commit 1 && test_commit 2 && mkdir sub && - test_commit 3 sub/3 && + test_commit 3 sub/3.t && test_commit 4 ' diff --git a/t/t4136-apply-check.sh b/t/t4136-apply-check.sh new file mode 100755 index 000000000..a321f7c24 --- /dev/null +++ b/t/t4136-apply-check.sh @@ -0,0 +1,19 @@ +#!/bin/sh + +test_description='git apply should exit non-zero with unrecognized input.' + +. ./test-lib.sh + +test_expect_success 'setup' ' + test_commit 1 +' + +test_expect_success 'apply --check exits non-zero with unrecognized input' ' + test_must_fail git apply --check - <<-\EOF + I am not a patch + I look nothing like a patch + git apply must fail + EOF +' + +test_done |