mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 08:47:44 +00:00
Shell: Move to Userland/Shell/
This commit is contained in:
parent
07c7e35372
commit
c4e2fd8123
35 changed files with 11 additions and 9 deletions
13
Userland/Shell/Tests/sigpipe.sh
Normal file
13
Userland/Shell/Tests/sigpipe.sh
Normal file
|
@ -0,0 +1,13 @@
|
|||
#!/bin/sh
|
||||
|
||||
# `head -n 1` should close stdout of the `Shell -c` command, which means the
|
||||
# second echo should exit unsuccessfully and sigpipe.sh.out should not be
|
||||
# created.
|
||||
rm -f sigpipe.sh.out
|
||||
|
||||
{ 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.
|
||||
# So the test only fails if sigpipe.sh.out exists (since then `exit 1` runs),
|
||||
# not if the `test` statement returns false.
|
||||
test -e sigpipe.sh.out && exit 1
|
Loading…
Add table
Add a link
Reference in a new issue