diff options
author | Eric Sunshine <sunshine@sunshineco.com> | 2021-12-13 09:30:48 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-12-14 01:15:28 +0300 |
commit | 0cca54c706128338ee79efb55e9c0ddb6be723dc (patch) | |
tree | 7ecf220ec1ceac2d494fcc5eda710c1703cc9ba0 /t/chainlint/one-liner.expect | |
parent | 1ad0780a779bbc4cc6dbda86ef20f69071d25235 (diff) |
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>
Diffstat (limited to 't/chainlint/one-liner.expect')
-rw-r--r-- | t/chainlint/one-liner.expect | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/t/chainlint/one-liner.expect b/t/chainlint/one-liner.expect index 237f227349..c64058f7af 100644 --- a/t/chainlint/one-liner.expect +++ b/t/chainlint/one-liner.expect @@ -4,6 +4,6 @@ ?!SEMI?!(foo; bar) && ?!SEMI?!(foo; bar) | -?!SEMI?!(foo; bar) >baz +?!SEMI?!(foo; bar) >baz && (foo "bar; baz") |