diff options
author | Shawn O. Pearce <spearce@spearce.org> | 2008-03-03 20:09:31 -0500 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-03-03 18:26:23 -0800 |
commit | be7bae0d4821462c50c5b82633edb372fe971e9e (patch) | |
tree | 6c229a44fb2c4646e70c6c529ea0de12bb1f3f59 | |
parent | 3167d7256505cdeace5293bc67f0d16657a9277e (diff) | |
download | git-be7bae0d4821462c50c5b82633edb372fe971e9e.tar.gz git-be7bae0d4821462c50c5b82633edb372fe971e9e.tar.xz |
Don't allow git-describe failures to go unnoticed in t6120
If git-describe fails we never execute the test_expect_success,
so we never actually test for failure. This is horribly wrong.
We need to always run the test case, but the test case is only
supposed to succeed if the prior git-describe returned 0.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rwxr-xr-x | t/t6120-describe.sh | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/t/t6120-describe.sh b/t/t6120-describe.sh index a7557bdc7..ba9ea60d1 100755 --- a/t/t6120-describe.sh +++ b/t/t6120-describe.sh @@ -15,8 +15,10 @@ test_description='test describe check_describe () { expect="$1" shift - R=$(git describe "$@") && + R=$(git describe "$@") + S=$? test_expect_success "describe $*" ' + test $S = 0 && case "$R" in $expect) echo happy ;; *) echo "Oops - $R is not $expect"; |