1
0
Fork 0
git/t/chainlint/chained-subshell.test
Daniel Baumann 54102a2c29
Adding upstream version 1:2.47.2.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-23 07:43:39 +02:00

15 lines
398 B
Text

test_expect_success 'chained-subshell' '
# LINT: start of subshell chained to preceding command
mkdir sub && (
cd sub &&
foo the bar
nuff said
) &&
# LINT: preceding command pipes to subshell on same line
cut "-d " -f actual | (read s1 s2 s3 &&
test -f $s1
test $(cat $s2) = tree2path1 &&
# LINT: closing subshell ")" correctly detected on same line as "$(...)"
test $(cat $s3) = tree3path1)
'