Re: [PATCH v4 4/6] tests: use shorter here-docs in chainlint.sed for AIX sed
- From
Eric Sunshine <sunshine@sunshineco.com>
- Date
- Aug 24, 2018, 21:29 UTC
- Message-ID
- <CAPig+cQxUdr0g+i6AztcH4Q51X-W4MtdhKGv=wau+b6SFsniAQ@mail.gmail.com>
- In-Reply-To
- <20180824152016.20286-5-avarab@gmail.com>
On Fri, Aug 24, 2018 at 11:20 AM Ævar Arnfjörð Bjarmason <avarab@gmail.com> wrote:
Show 5 quoted lines
> Improve the portability of chainlint by using shorter here-docs. On > AIX sed will complain about: > > sed: 0602-417 The label :hereslurp is greater than eight > characters
Shortening the names makes them ugly and often unreadable. That's not a complaint with this patch; just a general observation regarding 8-byte limitation with this platform's "sed" (and POSIX). See a few suggested improvements below, but probably not worth a re-roll.
Show 5 quoted lines
> This, in combination with the previous fix to this file makes > GIT_TEST_CHAIN_LINT=1 (which is the default) working again on AIX > without issues, and the "gmake check-chainlint" test also passes. > > Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
FWIW, Acked-by: Eric Sunshine <sunshine@sunshineco.com>
> diff --git a/t/chainlint.sed b/t/chainlint.sed > -:checkchain > +:chkchn
":chkchain"
> # found incomplete line "...\" -- slurp up next line > -:incomplete > +:icmplte
":fold" (for "fold out NL")
> # found nested multi-line "(...\n...)" -- pass through untouched > -:nestslurp > +:nstslurp
":nesteat"
> -:nestcontinue > +:nstcnt
":nestcont"
> -:nestclose > +:nstclose
":nestend" or ":endnest"
> # found closing ")" on own line -- drop "suspect" from final line of subshell > # since that line legitimately lacks "&&" and exit subshell loop > -:closesolo > +:clssolo
":endsolo"