Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Sunshine <sunshine@sunshineco.com>2021-12-13 09:30:45 +0300
committerJunio C Hamano <gitster@pobox.com>2021-12-14 01:15:28 +0300
commit925d7304d2a5f5dda9fbe3f541338bb87083f6b2 (patch)
tree2ea7dd7677b25551681ccda8a5053a938dbe7025 /t/chainlint/if-then-else.test
parente773545c7fe7eca21b134847f4fc2cbc9547fa14 (diff)
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>
Diffstat (limited to 't/chainlint/if-then-else.test')
-rw-r--r--t/chainlint/if-then-else.test3
1 files changed, 2 insertions, 1 deletions
diff --git a/t/chainlint/if-then-else.test b/t/chainlint/if-then-else.test
index 9bd8e9a4c6..d2b03ca6b4 100644
--- a/t/chainlint/if-then-else.test
+++ b/t/chainlint/if-then-else.test
@@ -7,6 +7,7 @@
# LINT: last statement before 'elif' does not need "&&"
echo empty
elif test -z ""
+ then
# LINT: last statement before 'else' does not need "&&"
echo foo
else
@@ -24,5 +25,5 @@
if test -n ""; then
echo very &&
echo empty
- if
+ fi
)