Port jobs test to littlecheck

This commit is contained in:
Fabian Homborg 2020-02-08 09:44:39 +01:00
parent 0fab1ce8b4
commit 2fa8ae161a
3 changed files with 20 additions and 19 deletions

View File

@ -1,16 +1,29 @@
#RUN: %fish %s
jobs -q; echo $status
#CHECK: 1
sleep 5 &
sleep 5 &
jobs -c
#CHECK: Command
#CHECK: sleep
#CHECK: sleep
jobs -q; echo $status
#CHECK: 0
bg -23 1 2>/dev/null
or echo bg: invalid option -23 >&2
#CHECKERR: bg: invalid option -23
fg 3
#CHECKERR: fg: No suitable job: 3
bg 3
#CHECKERR: bg: Could not find job '3'
sleep 1 &
disown
jobs -c
#CHECK: Command
#CHECK: sleep
#CHECK: sleep
disown foo
#CHECKERR: disown: 'foo' is not a valid job specifier
disown (jobs -p)
or exit 0
@ -34,5 +47,12 @@ sleep 2
# Verify `jobs -l` works and returns the right status codes
# https://github.com/fish-shell/fish-shell/issues/6104
jobs --last --command; echo $status
#CHECK: Command
#CHECK: sleep
#CHECK: sleep is done
#CHECK: 1
sleep 0.2 &
jobs -lc; echo $status
#CHECK: Command
#CHECK: sleep
#CHECK: 0

View File

@ -1,4 +0,0 @@
bg: invalid option -23
fg: No suitable job: 3
bg: Could not find job '3'
disown: 'foo' is not a valid job specifier

View File

@ -1,15 +0,0 @@
1
Command
sleep
sleep
0
Command
sleep
sleep
Command
sleep
sleep is done
1
Command
sleep
0