aboutsummaryrefslogtreecommitdiff
path: root/tests/builtin/timeout.testscript
blob: b8eddc3b3c66477b7246a23fda6e132e2fffdc90 (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
27
28
29
30
# file      : tests/builtin/timeout.testscript
# license   : MIT; see accompanying LICENSE file

: async-builtin
:
{
  : expired
  :
  $* -s 5 'cat' <'test' | $* -t 1 'cat' >=f 2>'timeout expired' != 0

  : not-expired
  :
  echo 'test' | $* -t 10000 'cat' >!
}

: pseudo-builtin
:
{
  : expired
  :
  $* -s 5 'cat' <'test' | $* -t 1 'roundtrip' >=f 2>'timeout expired' != 0

  : not-expired
  :
  echo 'test' | $* -t 10000 'roundtrip' >!
}

: sync-builtin
:
$* -t 1 'mkdir' d &d/