aboutsummaryrefslogtreecommitdiff
path: root/tests/test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test')
-rw-r--r--tests/test/script/builtin/sleep.testscript2
-rw-r--r--tests/test/script/runner/for.testscript4
-rw-r--r--tests/test/script/runner/pipe.testscript14
-rw-r--r--tests/test/script/runner/set.testscript13
-rw-r--r--tests/test/script/runner/status.testscript8
-rw-r--r--tests/test/script/runner/timeout.testscript32
6 files changed, 46 insertions, 27 deletions
diff --git a/tests/test/script/builtin/sleep.testscript b/tests/test/script/builtin/sleep.testscript
index e1410ac..c044027 100644
--- a/tests/test/script/builtin/sleep.testscript
+++ b/tests/test/script/builtin/sleep.testscript
@@ -13,7 +13,7 @@ $c <'sleep 1' && $b
: failure
:
$c <'env -t 1 -- sleep 86400' && $b 2>>~%EOE% != 0
- %testscript:.*: error: sleep terminated: execution timeout expired%
+ %testscript:.*: error: builtin sleep terminated: execution timeout expired%
%.
EOE
diff --git a/tests/test/script/runner/for.testscript b/tests/test/script/runner/for.testscript
index 765b978..f43fcc2 100644
--- a/tests/test/script/runner/for.testscript
+++ b/tests/test/script/runner/for.testscript
@@ -157,7 +157,7 @@
end
end
EOI
- testscript:3:5: error: test exited with code 1
+ testscript:3:5: error: builtin test exited with code 1
info: test id: 1
EOE
@@ -427,7 +427,7 @@
end
end
EOI
- testscript:3:5: error: test exited with code 1
+ testscript:3:5: error: builtin test exited with code 1
info: test id: 1
EOE
diff --git a/tests/test/script/runner/pipe.testscript b/tests/test/script/runner/pipe.testscript
index 92ab33e..cdd30a6 100644
--- a/tests/test/script/runner/pipe.testscript
+++ b/tests/test/script/runner/pipe.testscript
@@ -6,7 +6,6 @@
$c <'cat <foo | $* -i 1 >foo' && $b : builtin-to-process
$c <'$* -o foo | cat >foo' && $b : process-to-builtin
-
: failure
:
: Note that while both commands for the pipe are faulty the diagnostics for
@@ -15,10 +14,19 @@ $c <'$* -o foo | cat >foo' && $b : process-to-builtin
{
: exit-code
:
- $c <'$* -o foo -s 1 | $* -i 1 >foo -s 2' && $b 2>>/~%EOE% != 0
- %testscript:1:1: error: .+ exited with code 2%
+ : Also verify that the command line is printed.
+ :
+ $c <'$* -o foo -s 1 | $* -i 1 -s 2 >foo' && $b --verbose 1 2>>/~%EOE% != 0
+ %.
+ %testscript:1:1: error: process .+ exited with code 1%
+ % info: command line: .+driver.* -o foo -s 1%
+ info: test id: 1
+ %.
+ %testscript:1:1: error: process .+ exited with code 2%
+ % info: command line: .+driver.* -i 1 -s 2%
info: stdout: test/1/stdout-c2
info: test id: 1
+ %.{2}
EOE
: stderr
diff --git a/tests/test/script/runner/set.testscript b/tests/test/script/runner/set.testscript
index b22e3f0..ff77f6f 100644
--- a/tests/test/script/runner/set.testscript
+++ b/tests/test/script/runner/set.testscript
@@ -300,7 +300,7 @@
$c <<EOI && $b 2>>~%EOE% != 0
$* -o 'foo' -l 10 | env -t 1 -- set bar
EOI
- %testscript:.*: error: set terminated: execution timeout expired%
+ %testscript:.*: error: .+driver.* terminated: execution timeout expired%
%.
EOE
@@ -326,21 +326,18 @@
echo "$s" >=f;
$* -o 'foo' -l 10 | cat f - | env -t 2 -- set bar
EOI
- %testscript:.*: error: set terminated: execution timeout expired%
+ %testscript:.*: error: process .+driver.* terminated: execution timeout expired%
+ %.
+ %testscript:.*: error: builtin cat terminated: execution timeout expired%
%.
EOE
: success
:
- : Note that the cat builtin ends up with the 'broken pipe' diagnostics or
- : similar.
- :
$c <<EOI && $b
echo "$s" >=f;
timeout --success 2;
- $* -o 'foo' -l 10 | cat f - 2>>~%EOE% | set bar
- %cat: .+%
- EOE
+ $* -o 'foo' -l 10 | cat f - | set bar
EOI
}
diff --git a/tests/test/script/runner/status.testscript b/tests/test/script/runner/status.testscript
index e4586d9..461fd5c 100644
--- a/tests/test/script/runner/status.testscript
+++ b/tests/test/script/runner/status.testscript
@@ -15,7 +15,7 @@ b += --no-column
: false
:
$c <'$* -s 1 == 0' && $b 2>>/~%EOE%d != 0
- %testscript:1: error: ../../../../driver(.exe)? exit code 1 != 0%
+ %testscript:1: error: process ../../../../driver(.exe)? exit code 1 != 0%
info: test id: 1
EOE
}
@@ -30,7 +30,7 @@ b += --no-column
: false
:
$c <'$* -s 1 != 1' && $b 2>>/~%EOE% != 0
- %testscript:1: error: ../../../../driver(.exe)? exit code 1 == 1%
+ %testscript:1: error: process ../../../../driver(.exe)? exit code 1 == 1%
info: test id: 1
EOE
}
@@ -38,7 +38,7 @@ b += --no-column
: error
:
$c <'$* -s 1 -e "Error"' && $b 2>>/~%EOE% != 0
-%testscript:1: error: ../../../driver(.exe)? exited with code 1%
+%testscript:1: error: process ../../../driver(.exe)? exited with code 1%
info: stderr: test/1/stderr
Error
info: test id: 1
@@ -47,7 +47,7 @@ EOE
: error-check
:
$c <'$* -s 1 -e "Error" == 0' && $b 2>>/~%EOE% != 0
-%testscript:1: error: ../../../driver(.exe)? exit code 1 != 0%
+%testscript:1: error: process ../../../driver(.exe)? exit code 1 != 0%
info: stderr: test/1/stderr
Error
info: test id: 1
diff --git a/tests/test/script/runner/timeout.testscript b/tests/test/script/runner/timeout.testscript
index 5f87d39..f9b6ec7 100644
--- a/tests/test/script/runner/timeout.testscript
+++ b/tests/test/script/runner/timeout.testscript
@@ -424,7 +424,9 @@
$c <<EOI && $b 2>>~%EOE% != 0
env -t 1 -- $* -l 86400 -o 'foo' | touch $~/foo/bar
EOI
- %testscript:.*: error: touch exited with code 1%
+ %testscript:.*: error: process .+driver.* terminated: execution timeout expired%
+ %.
+ %testscript:.*: error: builtin touch exited with code 1%
%.+
EOE
}
@@ -435,42 +437,54 @@
: prog-tm-prog
:
$c <'$* -l 10 | env -t 1 -- $* -i 0' && $b 2>>~%EOE% != 0
- %testscript:.*: error: .+driver.* terminated: execution timeout expired%
+ %testscript:.*: error: process .+driver.* terminated: execution timeout expired%
+ %.
+ %testscript:.*: error: process .+driver.* terminated: execution timeout expired%
%.
EOE
: tm-prog-prog
:
$c <'env -t 1 -- $* -l 10 | $* -i 0' && $b 2>>~%EOE% != 0
- %testscript:.*: error: .+driver.* terminated: execution timeout expired%
+ %testscript:.*: error: process .+driver.* terminated: execution timeout expired%
+ %.
+ %testscript:.*: error: process .+driver.* terminated: execution timeout expired%
%.
EOE
: tm-cat-prog
:
- $c <'env -t 1 -- cat <"test" | $* -l 10' && $b 2>>~%EOE% != 0
- %testscript:.*: error: cat terminated: execution timeout expired%
+ $c <'env -t 3 -- cat <"test" | $* -l 10' && $b 2>>~%EOE% != 0
+ %testscript:.*: error: builtin cat terminated: execution timeout expired%
+ %.
+ %testscript:.*: error: process .+driver.* terminated: execution timeout expired%
%.
EOE
: cat-tm-prog
:
$c <'cat <"test" | env -t 1 -- $* -l 10' && $b 2>>~%EOE% != 0
- %testscript:.*: error: .+driver.* terminated: execution timeout expired%
+ %testscript:.*: error: builtin cat terminated: execution timeout expired%
+ %.
+ %testscript:.*: error: process .+driver.* terminated: execution timeout expired%
%.
EOE
: tm-prog-cat
:
$c <'env -t 1 -- $* -l 10 | cat >-' && $b 2>>~%EOE% != 0
- %testscript:.*: error: .+driver.* terminated: execution timeout expired%
+ %testscript:.*: error: process .+driver.* terminated: execution timeout expired%
+ %.
+ %testscript:.*: error: builtin cat terminated: execution timeout expired%
%.
EOE
: tm-echo-prog
:
- $c <'env -t 1 -- echo "test" | $* -l 10' && $b 2>>~%EOE% != 0
- %testscript:.*: error: echo terminated: execution timeout expired%
+ $c <'env -t 3 -- echo "test" | $* -l 10' && $b 2>>~%EOE% != 0
+ %testscript:.*: error: builtin echo terminated: execution timeout expired%
+ %.
+ %testscript:.*: error: process .+driver.* terminated: execution timeout expired%
%.
EOE