From 1ad0780a779bbc4cc6dbda86ef20f69071d25235 Mon Sep 17 00:00:00 2001 From: Eric Sunshine Date: Mon, 13 Dec 2021 01:30:47 -0500 Subject: t/chainlint/*.test: generalize self-test commentary The purpose of chainlint.sed is to detect &&-chain breakage only within subshells (one level deep); it doesn't bother checking for top-level &&-chain breakage since the &&-chain checker built into t/test-lib.sh should detect broken &&-chains outside of subshells by making them magically exit with code 117. However, this division of labor may not always be the case if a more capable chainlint implementation is ever developed. Beyond that, due to being sed-based and due to its use of heuristics, chainlint.sed has several limitations (such as being unable to detect &&-chain breakage in subshells more than one level deep since it only manually emulates recursion into a subshell). Some of the comments in the chainlint self-tests unnecessarily reflect the limitations of chainlint.sed even though those limitations are not what is being tested. Therefore, simplify and generalize the comments to explain only what is being tested, thus ensuring that they won't become outdated if a more capable chainlint is ever developed. Signed-off-by: Eric Sunshine Signed-off-by: Junio C Hamano --- t/chainlint/one-liner.test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 't/chainlint/one-liner.test') diff --git a/t/chainlint/one-liner.test b/t/chainlint/one-liner.test index ec9acb9825..69796d7505 100644 --- a/t/chainlint/one-liner.test +++ b/t/chainlint/one-liner.test @@ -3,7 +3,7 @@ (foo && bar) | (foo && bar) >baz && -# LINT: top-level one-liner subshell missing internal "&&" +# LINT: top-level one-liner subshell missing internal "&&" and broken &&-chain (foo; bar) && (foo; bar) | (foo; bar) >baz -- cgit v1.2.3