summaryrefslogtreecommitdiff
path: root/t/t6300-for-each-ref.sh
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2011-09-07 17:43:28 (GMT)
committerJunio C Hamano <gitster@pobox.com>2011-09-08 20:51:15 (GMT)
commit7140c22c8e98042053d5ff63c8514f5cdf1cb6ed (patch)
treedfa0f608f8a3e4e41c5800ceb4b3ccbc350821f7 /t/t6300-for-each-ref.sh
parent37d3e85912ea13cb1d59022e2bc2ea8cf8bf4876 (diff)
downloadgit-7140c22c8e98042053d5ff63c8514f5cdf1cb6ed.zip
git-7140c22c8e98042053d5ff63c8514f5cdf1cb6ed.tar.gz
git-7140c22c8e98042053d5ff63c8514f5cdf1cb6ed.tar.bz2
t6300: add more body-parsing tests
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>
Diffstat (limited to 't/t6300-for-each-ref.sh')
-rwxr-xr-xt/t6300-for-each-ref.sh20
1 files changed, 20 insertions, 0 deletions
diff --git a/t/t6300-for-each-ref.sh b/t/t6300-for-each-ref.sh
index 7dc8a51..6fa4d52 100755
--- a/t/t6300-for-each-ref.sh
+++ b/t/t6300-for-each-ref.sh
@@ -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" "
@@ -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