aboutsummaryrefslogtreecommitdiff
path: root/tests/test/script/runner/env.testscript
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test/script/runner/env.testscript')
-rw-r--r--tests/test/script/runner/env.testscript29
1 files changed, 27 insertions, 2 deletions
diff --git a/tests/test/script/runner/env.testscript b/tests/test/script/runner/env.testscript
index 6fcedfa..ef90c3b 100644
--- a/tests/test/script/runner/env.testscript
+++ b/tests/test/script/runner/env.testscript
@@ -3,5 +3,30 @@
.include ../common.testscript
-$c <'env abc=xyz -- $* -v abc >xyz' && $b : set
-$c <'env --unset=abc -- $* -v abc >"<none>"' && env abc=xyz -- $b : unset
+: variables
+:
+{
+ $c <'env abc=xyz -- $* -v abc >xyz' && $b : set
+ $c <'env --unset=abc -- $* -v abc >"<none>"' && env abc=xyz -- $b : unset
+}
+
+: timeout
+:
+{
+ : expired
+ :
+ $c <'env --timeout 1 -- $* -l 5' && $b 2>>~%EOE% != 0
+ %testscript:1:1: error: .+ terminated: execution timeout expired%
+ info: test id: 1
+ EOE
+
+ : not-expired
+ :
+ $c <'env --timeout 5 -- $* -l 1' && $b
+
+ : invalid
+ :
+ $c <'env --timeout a -- $*' && $b 2>>EOE != 0
+ testscript:1:15: error: env: invalid value 'a' for option '--timeout'
+ EOE
+}