diff options
Diffstat (limited to 't/chainlint/chained-subshell.test')
-rw-r--r-- | t/chainlint/chained-subshell.test | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/t/chainlint/chained-subshell.test b/t/chainlint/chained-subshell.test new file mode 100644 index 0000000000..1f11f65398 --- /dev/null +++ b/t/chainlint/chained-subshell.test @@ -0,0 +1,15 @@ +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) +' |