fork/fish-shell

git clone https://git.julia.blue/fork/fish-shell

Fabian Boehmtests/checks/exec: Match entire env line0494b1b60

master
807 B22 linesraw
1# RUN: fish=%fish %fish %s
2
3exec cat <nosuchfile
4#CHECKERR: warning: An error occurred while redirecting file 'nosuchfile'
5#CHECKERR: warning: Path 'nosuchfile' does not exist
6echo "failed: $status"
7#CHECK: failed: 1
8not exec cat <nosuchfile
9#CHECKERR: warning: An error occurred while redirecting file 'nosuchfile'
10#CHECKERR: warning: Path 'nosuchfile' does not exist
11echo "neg failed: $status"
12#CHECK: neg failed: 0
13
14# See that variable overrides are applied to exec'd processes
15# Match the entire line because github actions passes commit messages in the environment,
16# so any message that includes "foo=bar" would also be matched.
17$fish --no-config -c 'foo=bar exec env' | grep '^foo=bar$'
18# CHECK: foo=bar
19
20# This needs to be last, because it actually runs exec.
21exec cat </dev/null
22echo "not reached"