fish-shell/tests/checks/exec.fish

17 lines
502 B
Fish
Raw Normal View History

2020-02-08 09:38:11 +00:00
#RUN: %fish %s
exec cat <nosuchfile
2020-02-08 09:38:11 +00:00
#CHECKERR: warning: An error occurred while redirecting file 'nosuchfile'
#CHECKERR: warning: Path 'nosuchfile' does not exist
2020-02-08 09:38:11 +00:00
echo "failed: $status"
#CHECK: failed: 1
not exec cat <nosuchfile
2020-02-08 09:38:11 +00:00
#CHECKERR: warning: An error occurred while redirecting file 'nosuchfile'
#CHECKERR: warning: Path 'nosuchfile' does not exist
2020-02-08 09:38:11 +00:00
echo "neg failed: $status"
#CHECK: neg failed: 0
# This needs to be last, because it actually runs exec.
exec cat </dev/null
2020-02-08 09:38:11 +00:00
echo "not reached"