t6300: refactor %(trailers) tests
authorTaylor Blau <me@ttaylorr.com>
Mon, 2 Oct 2017 05:25:22 +0000 (22:25 -0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 2 Oct 2017 06:36:27 +0000 (15:36 +0900)
We currently have one test for %(trailers) in `git-for-each-ref(1)`,
through "%(contents:trailers)". In preparation for more, let's add a few
things:

- Move the commit creation step to its own test so that it can be
re-used.

- Add a non-trailer to the commit's trailers to test that non-trailers
aren't shown using "%(trailers:only)".

- Add a multi-line trailer to ensure that trailers are unfolded
correctly using "%(trailers:unfold)".

Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
No differences found