Skip to content

here-doc test bodies

Jeff King git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 7 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2test-lib: allow test snippets as here-docst/README t/test-lib-functions.sh+34 -45 replies
2/2t1404: convert to here-doc test bodiest/t1404-update-ref-errors.sh+137 -1370 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC/PATCH 0/2] here-doc test bodies

I've been wanting to do this for years, but after getting bitten by a misplaced quote the other day, I finally did. This series allows you to do:

test_expect_success <<\EOT
something 'with single quotes'
EOT

Thoughts?

The first patch is the implementation. The second one shows it off.

[1/2]: test-lib: allow test snippets as here-docs [2/2]: t1404: convert to here-doc test bodies

 t/README                     |   8 +
 t/t1404-update-ref-errors.sh | 274 +++++++++++++++++------------------
 t/test-lib-functions.sh      |  30 +++-
 3 files changed, 171 insertions(+), 141 deletions(-)

-Peff