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