2023-10-06 16:15:25 +00:00
|
|
|
#RUN: %fish -C 'set -l fish %fish' %s
|
|
|
|
|
2020-03-09 18:36:12 +00:00
|
|
|
exec cat <nosuchfile
|
2020-02-08 09:38:11 +00:00
|
|
|
#CHECKERR: warning: An error occurred while redirecting file 'nosuchfile'
|
2021-11-19 20:11:28 +00:00
|
|
|
#CHECKERR: warning: Path 'nosuchfile' does not exist
|
2020-02-08 09:38:11 +00:00
|
|
|
echo "failed: $status"
|
|
|
|
#CHECK: failed: 1
|
2020-03-09 18:36:12 +00:00
|
|
|
not exec cat <nosuchfile
|
2020-02-08 09:38:11 +00:00
|
|
|
#CHECKERR: warning: An error occurred while redirecting file 'nosuchfile'
|
2021-11-19 20:11:28 +00:00
|
|
|
#CHECKERR: warning: Path 'nosuchfile' does not exist
|
2020-02-08 09:38:11 +00:00
|
|
|
echo "neg failed: $status"
|
|
|
|
#CHECK: neg failed: 0
|
2020-09-25 14:44:02 +00:00
|
|
|
|
2023-10-06 16:15:25 +00: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 14:44:02 +00:00
|
|
|
# This needs to be last, because it actually runs exec.
|
2020-03-09 18:36:12 +00:00
|
|
|
exec cat </dev/null
|
2020-02-08 09:38:11 +00:00
|
|
|
echo "not reached"
|