aboutsummaryrefslogtreecommitdiff
path: root/tests/test/script/builtin/sleep.testscript
blob: e1410ac041540d257d7e83b532cf11bedf2f2043 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# file      : tests/test/script/builtin/sleep.testscript
# license   : MIT; see accompanying LICENSE file

.include ../common.testscript

: success
:
$c <'sleep 1' && $b

: timeout
:
{
  : failure
  :
  $c <'env -t 1 -- sleep 86400' && $b 2>>~%EOE% != 0
    %testscript:.*: error: sleep terminated: execution timeout expired%
    %.
    EOE

  : success
  :
  $c <<EOI && $b
    timeout --success 1;
    sleep 86400
    EOI
}