2023-10-07 00:15:25 +08:00
|
|
|
#RUN: %fish -C 'set -l fish %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
|
|
|
|
2023-10-07 00:15:25 +08:00
|
|
|
# See that variable overrides are applied to exec'd processes
|
|
|
|
$fish --no-config -c 'foo=bar exec env' | grep foo=bar
|
|
|
|
# CHECK: foo=bar
|
|
|
|
|
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"
|