aboutsummaryrefslogtreecommitdiff
path: root/tests/test/script/runner/test-runner.testscript
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2020-11-30 22:42:40 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2020-12-08 14:26:22 +0300
commitfb34688841668e6e4c939395c8387feabe8ddfdf (patch)
tree5e0da2e74cee981337f9cd19d148e9824d7d3c36 /tests/test/script/runner/test-runner.testscript
parent121a075bc2558003990377843393ca27d784f50f (diff)
Add support for config.test.runner
Diffstat (limited to 'tests/test/script/runner/test-runner.testscript')
-rw-r--r--tests/test/script/runner/test-runner.testscript31
1 files changed, 31 insertions, 0 deletions
diff --git a/tests/test/script/runner/test-runner.testscript b/tests/test/script/runner/test-runner.testscript
new file mode 100644
index 0000000..772fa1b
--- /dev/null
+++ b/tests/test/script/runner/test-runner.testscript
@@ -0,0 +1,31 @@
+# file : tests/test/script/runner/test-runner.testscript
+# license : MIT; see accompanying LICENSE file
+
+.include ../common.testscript
+
++if ($cxx.target.class == 'windows')
+ exit
+end
+
++cat <<EOI >=run
+ #!/bin/sh
+ if test "$1" = "--trace"; then
+ shift
+ echo "$*"
+ fi
+ "$@"
+ EOI
+
++chmod u+x run
+
+run=$~/run
+
+: basic
+:
+$c <<"EOI" && $b "config.test.runner=$run --trace"
+ cat <'text' >'text'; # Non-test program.
+ \$* -o 'text' >>~%EOO% # Test program.
+ %.+/driver -o text%
+ text
+ EOO
+ EOI