another batch after 2.47-rc0
[alt-git.git] / t / chainlint / chained-subshell.test
blob1f11f653982fa6239752388deb20f0d4db74640c
1 test_expect_success 'chained-subshell' '
2 # LINT: start of subshell chained to preceding command
3 mkdir sub && (
4         cd sub &&
5         foo the bar
6         nuff said
7 ) &&
9 # LINT: preceding command pipes to subshell on same line
10 cut "-d " -f actual | (read s1 s2 s3 &&
11 test -f $s1
12 test $(cat $s2) = tree2path1 &&
13 # LINT: closing subshell ")" correctly detected on same line as "$(...)"
14 test $(cat $s3) = tree3path1)