aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/test/script/parser+env.test.testscript
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2020-10-10 17:22:46 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2020-11-06 19:32:09 +0300
commitf41599c8e9435f3dfec60b872c2b4ae31177efdd (patch)
tree088f8d9bf906e4a2ed734e034699163c9ccc7306 /libbuild2/test/script/parser+env.test.testscript
parentac76a4fd2afff48a0d5db84592babe5cabef3a2c (diff)
Add support for test timeouts
Diffstat (limited to 'libbuild2/test/script/parser+env.test.testscript')
-rw-r--r--libbuild2/test/script/parser+env.test.testscript20
1 files changed, 15 insertions, 5 deletions
diff --git a/libbuild2/test/script/parser+env.test.testscript b/libbuild2/test/script/parser+env.test.testscript
index b1e864c..b6fb305 100644
--- a/libbuild2/test/script/parser+env.test.testscript
+++ b/libbuild2/test/script/parser+env.test.testscript
@@ -48,10 +48,10 @@
: set
:
{
- $* <'env a=b -- cmd' >'env a=b -- cmd' : var
- $* <'env -u a b=c -- cmd' >'env -u a - b=c -- cmd' : opt-var
- $* <'env a="b c" -- cmd' >"env a='b c' -- cmd" : quote
- $* <'env "a b"=c -- cmd' >"env 'a b=c' -- cmd" : quote-name
+ $* <'env a=b -- cmd' >'env a=b -- cmd' : var
+ $* <'env -u a b=c -- cmd' >'env -u a b=c -- cmd' : opt-var
+ $* <'env a="b c" -- cmd' >"env a='b c' -- cmd" : quote
+ $* <'env "a b"=c -- cmd' >"env 'a b=c' -- cmd" : quote-name
: double-quote
:
@@ -66,9 +66,19 @@
EOE
}
+: timeout
+:
+{
+ $* <'env -t 5 -- cmd' >'env -t 5 -- cmd' : short-opt
+ $* <'env --timeout 5 -- cmd' >'env -t 5 -- cmd' : long-opt
+ $* <'env --timeout=5 -- cmd' >'env -t 5 -- cmd' : long-opt-eq
+ $* <'env -u a -t 5 -- cmd' >'env -t 5 -u a -- cmd' : mult-opt
+ $* <'env -t 5 a=b -- cmd' >'env -t 5 a=b -- cmd' : args
+}
+
: non-first
:
-$* <'cmd1 && env -u a b=c -- cmd2' >'cmd1 && env -u a - b=c -- cmd2'
+$* <'cmd1 && env -u a b=c -- cmd2' >'cmd1 && env -u a b=c -- cmd2'
: no-cmd
: