aboutsummaryrefslogtreecommitdiff
path: root/tests/test/script/builtin/sleep.testscript
blob: c044027fa3b62c44ff812c39411445ca8722bd8f (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: builtin sleep terminated: execution timeout expired%
    %.
    EOE

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