From: Stephen Haberman Date: Fri, 20 Jun 2008 04:00:00 +0000 (-0500) Subject: Test ranges of tickets. X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=a17659feb68e2f6139d34a26d1fba3eb7dc470fe;p=git-central.git Test ranges of tickets. --- diff --git a/tests/t2000-server-pre-receive-ticket.sh b/tests/t2000-server-pre-receive-ticket.sh index 7c5c5d3..a158729 100644 --- a/tests/t2000-server-pre-receive-ticket.sh +++ b/tests/t2000-server-pre-receive-ticket.sh @@ -42,5 +42,37 @@ test_expect_success 'accept with re on second line' ' git push ' +test_expect_success 'reject with bad message in second of three' ' + echo "$test_name first" >a && + git commit -a -m "$test_name first re #3222" && + + # the bad one + echo "$test_name second" >a && + git commit -a -m "$test_name second" && + head=$(git rev-parse HEAD) + + echo "$test_name third" >a && + git commit -a -m "$test_name third re #3222" && + + git push + cat push.err | grep "Commit $head does not reference a ticket" +' + +test_expect_success 'accept with re in all of three' ' + git reset --hard HEAD^^^ + echo "$test_name first" >a && + git commit -a -m "$test_name first re #3222" && + + # the bad one + echo "$test_name second" >a && + git commit -a -m "$test_name second re #3222" && + head=$(git rev-parse HEAD) + + echo "$test_name third" >a && + git commit -a -m "$test_name third re #3222" && + + git push +' + test_done