chainlint: recognize multi-line $(...) when command cuddled with "$("
commit06fc5c9f90da9be18371bafad5f35b6b17cbf49e
authorEric Sunshine <sunshine@sunshineco.com>
Mon, 13 Aug 2018 08:47:36 +0000 (13 04:47 -0400)
committerJunio C Hamano <gitster@pobox.com>
Mon, 13 Aug 2018 19:22:11 +0000 (13 12:22 -0700)
tree63a687d5cf04e2e1a0d9a70ffacc8c0dbbbd38df
parent7e32a31b2101c3ced65ea9367c747930a4eb39d9
chainlint: recognize multi-line $(...) when command cuddled with "$("

For multi-line $(...) expressions nested within subshells, chainlint.sed
only recognizes:

    x=$(
        echo foo &&
        ...

but it is not unlikely that test authors may also cuddle the command
with the opening "$(", so support that style, as well:

    x=$(echo foo &&
        ...

The closing ")" is already correctly recognized when cuddled or not.

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/chainlint.sed
t/chainlint/multi-line-nested-command-substitution.expect
t/chainlint/multi-line-nested-command-substitution.test