mirror of
https://github.com/git/git
synced 2024-11-05 04:53:18 +00:00
0c7d630220
The chainlint.pl script recently learned about the upcoming: test_expect_success 'some test' - <<\EOT TEST_BODY EOT syntax, where TEST_BODY should be checked in the usual way. Let's make sure this works by adding a few tests. The "here-doc-body" file tests the basic syntax, including an embedded here-doc which we should still be able to recognize. Likewise the "here-doc-body-indent" checks the same thing, but using the "<<-" operator. We wouldn't expect this to be used normally, but we would not want to accidentally miss a body that uses it. The "pathological" variant checks the opposite: we don't get confused by an indented tag within the here-doc body. The "here-doc-double" tests the handling of two here-doc tags on the same line. This is not something we'd expect anybody to do in practice, but the code was written defensively to handle this, so let's make sure it works. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 lines
141 B
Text
4 lines
141 B
Text
test_expect_success 'here-doc-body-indent' - <<-\EOT
|
|
echo "we should find this"
|
|
echo "even though our heredoc has its indent stripped"
|
|
EOT
|