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>
This commit is contained in:
parent
3167d72565
commit
be7bae0d48
@ -15,8 +15,10 @@ test_description='test describe
|
|||||||
check_describe () {
|
check_describe () {
|
||||||
expect="$1"
|
expect="$1"
|
||||||
shift
|
shift
|
||||||
R=$(git describe "$@") &&
|
R=$(git describe "$@")
|
||||||
|
S=$?
|
||||||
test_expect_success "describe $*" '
|
test_expect_success "describe $*" '
|
||||||
|
test $S = 0 &&
|
||||||
case "$R" in
|
case "$R" in
|
||||||
$expect) echo happy ;;
|
$expect) echo happy ;;
|
||||||
*) echo "Oops - $R is not $expect";
|
*) echo "Oops - $R is not $expect";
|
||||||
|
Loading…
Reference in New Issue
Block a user