Files
fish-shell/tests/checks/disown.fish
Johannes Altmanninger fa33f6f0e0 tests/checks/disown.fish: improve test robustness
If the job never gets into stopped state, it will keep running forever.
Narrow the wait condition, to prevent a timeout in failure scenarios.
2026-04-20 17:03:09 +08:00

24 lines
559 B
Fish

# RUN: %fish %s
disown 0
# CHECKERR: disown: '0' is not a valid process ID
disown -- -1
# CHECKERR: disown: '-1' is not a valid process ID
disown -- -(math 2 ^ 31)
# CHECKERR: disown: '-2147483648' is not a valid process ID
disown
# CHECKERR: disown: There are no suitable jobs
# So jobs can be resumed by disown
status job-control full
sleep 1 &
set -l pid (jobs -lp)
kill -SIGSTOP $pid
while jobs -l | grep -q running
sleep .01
end
disown
# CHECKERR: disown: job 1 ('sleep 1 &') was stopped and has been signalled to continue.
echo $status
# CHECK: 0