Reject time with background jobs

This check could probably done earlier in the parser but it works.
This commit is contained in:
Johannes Altmanninger
2019-12-23 11:45:55 +01:00
committed by Mahmoud Al-Qudsi
parent 3de95038b0
commit c3374edc59
3 changed files with 30 additions and 4 deletions

View File

@@ -1,5 +1,5 @@
#RUN: %fish %s
time sleep 1s
#RUN: %fish -C 'set -l fish %fish' %s
time sleep 0s
# These are a tad awkward because it picks the correct unit and adapts whitespace.
# The idea is that it's a table.
@@ -43,3 +43,13 @@ not time true
#CHECKERR: {{.*}}
#CHECKERR: {{.*}}
#CHECKERR: {{.*}}
$fish -c 'time true&'
#CHECKERR: fish: {{.*}}
#CHECKERR: time true&
#CHECKERR: ^
$fish -c 'not time true&'
#CHECKERR: fish: {{.*}}
#CHECKERR: not time true&
#CHECKERR: ^