blob: 7d3954863825305acf42401cda5503d113a36588 (
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
31
32
33
34
35
36
37
|
# file : tests/test/script/builtin/sleep.testscript
# copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
# license : MIT; see accompanying LICENSE file
.include ../common.testscript
: unknown-option
:
$c <<EOI && $b
sleep -u 2>"sleep: unknown option '-u'" == 1
EOI
: success
:
$c <'sleep 1' && $b
: no-time
:
: Test passing no time interval.
:
$c <'sleep 2>"sleep: missing time interval" != 0' && $b
: invalid-time
:
: Test passing invalid time interval.
:
$c <<EOI && $b
sleep 1a 2>"sleep: invalid time interval '1a'" != 0
EOI
: unexpected-arg
:
: Test passing extra argument.
:
$c <<EOI && $b
sleep 1 1 2>"sleep: unexpected argument '1'" != 0
EOI
|