From a17659feb68e2f6139d34a26d1fba3eb7dc470fe Mon Sep 17 00:00:00 2001 From: Stephen Haberman Date: Thu, 19 Jun 2008 23:00:00 -0500 Subject: [PATCH] Test ranges of tickets. --- tests/t2000-server-pre-receive-ticket.sh | 32 ++++++++++++++++++++++++ 1 file changed, 32 insertions(+) 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 -- 2.39.5