Start the 2.46 cycle
[git.git] / t / chainlint / exit-loop.test
blob2f038207e194ca0c51106205b3d57f4c7d1d7881
2         for i in a b c
3         do
4 # LINT: "|| exit {n}" valid for-loop escape in subshell; no "&&" needed
5                 foo || exit 1
6                 bar &&
7                 baz
8         done
9 ) &&
11         while true
12         do
13 # LINT: "|| exit {n}" valid while-loop escape in subshell; no "&&" needed
14                 foo || exit 1
15                 bar &&
16                 baz
17         done
18 ) &&
20         i=0 &&
21         while test $i -lt 10
22         do
23 # LINT: "|| exit" (sans exit code) valid escape in subshell; no "&&" needed
24                 echo $i || exit
25                 i=$(($i + 1))
26         done