t/chainlint/one-liner: avoid overly intimate chainlint.sed knowledge

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. Unfortunately, one of the chainlint.sed self-tests has overly intimate knowledge of this particular division of responsibilities and only cares about what chainlint.sed itself will produce, while ignoring the fact that a more all-encompassing linter would complain about a broken &&-chain outside the subshell. This makes it difficult to re-use the test with a more capable chainlint implementation should one ever be developed. Therefore, adjust the test and its "expected" output to avoid being specific to the tunnel-vision of this one implementation. Signed-off-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Eric Sunshine committed Dec 13, 2021 at 01:30 UTC 0cca54c706128338ee79efb55e9c0ddb6be723dc
2 files changed +2 -2
t/chainlint/one-liner.expect
+1 -1
@@ -4,6 +4,6 @@
4
5 ?!SEMI?!(foo; bar) &&
6 ?!SEMI?!(foo; bar) |
7 -?!SEMI?!(foo; bar) >baz
7 +?!SEMI?!(foo; bar) >baz &&
8
9 (foo "bar; baz")
t/chainlint/one-liner.test
+1 -1
@@ -6,7 +6,7 @@
6 # LINT: top-level one-liner subshell missing internal "&&" and broken &&-chain
7 (foo; bar) &&
8 (foo; bar) |
9 -(foo; bar) >baz
9 +(foo; bar) >baz &&
10
11 # LINT: ";" in string not misinterpreted as broken &&-chain
12 (foo "bar; baz")