Shell: Use a subshell instead of explicitly calling a shell binary in a test

This commit fixes a FIXME in a test, as we have subshells now.
This commit is contained in:
AnotherTest 2020-09-13 14:01:59 +04:30 committed by Andreas Kling
parent 0b57cdff82
commit 519aa2048a
Notes: sideshowbarker 2024-07-19 02:25:09 +09:00

View File

@ -5,9 +5,7 @@
# created. # created.
rm -f sigpipe.sh.out rm -f sigpipe.sh.out
# FIXME: It'd be nice if there was a way to create a subshell that makes { echo foo && echo bar && echo baz > sigpipe.sh.out } | head -n 1 > /dev/null
# fewer assumptions about cwd and the build directory name.
Build/Meta/Lagom/shell -c 'echo foo && echo bar && echo baz > sigpipe.sh.out' | head -n 1 > /dev/null
# Failing commands don't make the test fail, just an explicit `exit 1` does. # Failing commands don't make the test fail, just an explicit `exit 1` does.
# So the test only fails if sigpipe.sh.out exists (since then `exit 1` runs), # So the test only fails if sigpipe.sh.out exists (since then `exit 1` runs),