git/t/chainlint/if-then-else.expect
Eric Sunshine 925d7304d2 t/chainlint/*.test: don't use invalid shell syntax
The chainlint self-test code snippets are supposed to represent the body
of a test_expect_success() or test_expect_failure(), yet the contents of
these tests would have caused the shell to report syntax errors had they
been real test bodies. Although chainlint.sed, with its simplistic
heuristics, is blind to these syntactic problems, a future more robust
chainlint implementation might not have such a limitation, so make these
snippets syntactically valid.

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-12-13 14:15:28 -08:00

21 lines
203 B
Plaintext

(
if test -n ""
then
?!AMP?! echo very
echo empty
elif test -z ""
then
echo foo
else
echo foo &&
cat
?!AMP?! fi
echo poodle
>) &&
(
if test -n ""; then
echo very &&
echo empty
fi
>)