diff options
Diffstat (limited to 't/t6300-for-each-ref.sh')
-rwxr-xr-x | t/t6300-for-each-ref.sh | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/t/t6300-for-each-ref.sh b/t/t6300-for-each-ref.sh index 039509a9cb..aea1dfc714 100755 --- a/t/t6300-for-each-ref.sh +++ b/t/t6300-for-each-ref.sh @@ -563,4 +563,29 @@ test_expect_success 'do not dereference NULL upon %(HEAD) on unborn branch' ' test_cmp expect actual ' +cat >trailers <<EOF +Reviewed-by: A U Thor <author@example.com> +Signed-off-by: A U Thor <author@example.com> +EOF + +test_expect_success 'basic atom: head contents:trailers' ' + echo "Some contents" > two && + git add two && + git commit -F - <<-EOF && + trailers: this commit message has trailers + + Some message contents + + $(cat trailers) + EOF + git for-each-ref --format="%(contents:trailers)" refs/heads/master >actual && + sanitize_pgp <actual >actual.clean && + # git for-each-ref ends with a blank line + cat >expect <<-EOF && + $(cat trailers) + + EOF + test_cmp expect actual.clean +' + test_done |