aboutsummaryrefslogtreecommitdiff
path: root/tests/test/script/builtin/sleep.testscript
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test/script/builtin/sleep.testscript')
-rw-r--r--tests/test/script/builtin/sleep.testscript18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/test/script/builtin/sleep.testscript b/tests/test/script/builtin/sleep.testscript
index 21ed07b..e1410ac 100644
--- a/tests/test/script/builtin/sleep.testscript
+++ b/tests/test/script/builtin/sleep.testscript
@@ -6,3 +6,21 @@
: 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
+}