Sync with 'maint'
[git.git] / t / chainlint / semicolon.test
blobfc0ba1b5397916db466522a2f770a05d718a9cba
1 test_expect_success 'semicolon' '
3 # LINT: missing internal "&&" and ending "&&"
4         cat foo ; echo bar
5 # LINT: final statement before ")" only missing internal "&&"
6         cat foo ; echo bar
7 ) &&
9 # LINT: missing internal "&&"
10         cat foo ; echo bar &&
11         cat foo ; echo bar
12 ) &&
14 # LINT: not fooled by semicolon in string
15         echo "foo; bar" &&
16         cat foo; echo bar
17 ) &&
19 # LINT: semicolon unnecessary but legitimate
20         foo;
21 ) &&
22 (cd foo &&
23         for i in a b c; do
24 # LINT: semicolon unnecessary but legitimate
25                 echo;
26         done)