test_expect_success 'multi-line-nested-command-substitution' '
(
foo &&
x=$(
echo bar |
cat
) &&
echo ok
) |
sort &&
bar &&
x=$(echo bar |
y=$(echo baz |
fip) &&
echo fail
)
'