Skip to content

Commit

Permalink
t6300: add more body-parsing tests
Browse files Browse the repository at this point in the history
The current tests don't actually check parsing commit and
tag messages that have both a subject and a body (they just
have single-line messages).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Jeff King authored and Junio C Hamano committed Sep 8, 2011
1 parent 37d3e85 commit 7140c22
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions t/t6300-for-each-ref.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ test_atom() {
case "$1" in
head) ref=refs/heads/master ;;
tag) ref=refs/tags/testtag ;;
*) ref=$1 ;;
esac
printf '%s\n' "$3" >expected
test_expect_${4:-success} "basic atom: $1 $2" "
Expand Down Expand Up @@ -359,4 +360,23 @@ test_expect_success 'an unusual tag with an incomplete line' '
'

test_expect_success 'create tag with subject and body content' '
cat >>msg <<-\EOF &&
the subject line
first body line
second body line
EOF
git tag -F msg subject-body
'
test_atom refs/tags/subject-body subject 'the subject line'
test_atom refs/tags/subject-body body 'first body line
second body line
'
test_atom refs/tags/subject-body contents 'the subject line
first body line
second body line
'

test_done

0 comments on commit 7140c22

Please sign in to comment.