mirror of
https://github.com/git/git
synced 2024-11-05 18:59:29 +00:00
34ba05c296
The purpose of chainlint is to highlight problems it finds in test code by inserting annotations at the location of each problem. Arbitrarily eliding bits of the code it is checking is not helpful, yet this is exactly what chainlint.sed does by cavalierly and unnecessarily dropping the here-doc operator and tag; i.e. `cat <<TAG` becomes simply `cat` in the output. This behavior can make it more difficult for the test writer to align the annotated output of chainlint.sed with the original test code. Address this by retaining here-doc tags. Signed-off-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
20 lines
210 B
Text
20 lines
210 B
Text
(
|
|
if test -n ""
|
|
then
|
|
echo very ?!AMP?!
|
|
echo empty
|
|
elif test -z ""
|
|
then
|
|
echo foo
|
|
else
|
|
echo foo &&
|
|
cat <<-EOF
|
|
fi ?!AMP?!
|
|
echo poodle
|
|
) &&
|
|
(
|
|
if test -n ""; then
|
|
echo very &&
|
|
echo empty
|
|
fi
|
|
)
|