Squashed 'third_party/git/' content from commit cb71568594
git-subtree-dir: third_party/git git-subtree-split: cb715685942260375e1eb8153b0768a376e4ece7
This commit is contained in:
commit
1b593e1ea4
3629 changed files with 1139935 additions and 0 deletions
27
t/chainlint/exit-loop.test
Normal file
27
t/chainlint/exit-loop.test
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
(
|
||||
for i in a b c
|
||||
do
|
||||
# LINT: "|| exit {n}" valid for-loop escape in subshell; no "&&" needed
|
||||
foo || exit 1
|
||||
bar &&
|
||||
baz
|
||||
done
|
||||
) &&
|
||||
(
|
||||
while true
|
||||
do
|
||||
# LINT: "|| exit {n}" valid while-loop escape in subshell; no "&&" needed
|
||||
foo || exit 1
|
||||
bar &&
|
||||
baz
|
||||
done
|
||||
) &&
|
||||
(
|
||||
i=0 &&
|
||||
while test $i -lt 10
|
||||
do
|
||||
# LINT: "|| exit" (sans exit code) valid escape in subshell; no "&&" needed
|
||||
echo $i || exit
|
||||
i=$(($i + 1))
|
||||
done
|
||||
)
|
||||
Loading…
Add table
Add a link
Reference in a new issue