[PATCH v3 3/5] tests: use shorter here-docs in chainlint.sed for AIX sed
- From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
- Date
- Aug 23, 2018, 20:36 UTC
- Message-ID
- <20180823203604.5564-4-avarab@gmail.com>
- In-Reply-To
- <20180823152502.3886-2-avarab@gmail.com>
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
charactersAs noted in [1] there's still a remaining recently introduced portability issue also introduced in 878f988350 ("t/test-lib: teach --chain-lint to detect broken &&-chains in subshells", 2018-07-11), so under AIX the tests must be run with GIT_TEST_CHAIN_LINT=0.
I don't know how to solve the other issue, and this gets us some of the way to GIT_TEST_CHAIN_LINT=1 working again on AIX.
1. https://public-inbox.org/git/871sapezba.fsf@evledraar.gmail.com/
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> --- t/chainlint.sed | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/t/chainlint.sed b/t/chainlint.sed index 8544df38df..2333705b27 100644 --- a/t/chainlint.sed +++ b/t/chainlint.sed @@ -97,11 +97,11 @@ /<<[ ]*[-\\']*[A-Za-z0-9_]/ { s/^\(.*\)<<[ ]*[-\\']*\([A-Za-z0-9_][A-Za-z0-9_]*\)'*/<\2>\1<</ s/[ ]*<<// - :hereslurp + :hered N /^<\([^>]*\)>.*\n[ ]*\1[ ]*$/!{ s/\n.*$// - bhereslurp + bhered } s/^<[^>]*>// s/\n.*$// @@ -283,11 +283,11 @@ bfolded :heredoc s/^\(.*\)<<[ ]*[-\\']*\([A-Za-z0-9_][A-Za-z0-9_]*\)'*/<\2>\1<</ s/[ ]*<<// -:hereslurpsub +:heredsub N /^<\([^>]*\)>.*\n[ ]*\1[ ]*$/!{ s/\n.*$// - bhereslurpsub + bheredsub } s/^<[^>]*>// s/\n.*$//
-- 2.18.0.865.gffc8e1a3cd6