diff options
Diffstat (limited to 'tests/test/script/runner/test-runner.testscript')
-rw-r--r-- | tests/test/script/runner/test-runner.testscript | 57 |
1 files changed, 57 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..372330b --- /dev/null +++ b/tests/test/script/runner/test-runner.testscript @@ -0,0 +1,57 @@ +# 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 + + { + prog = $0 + test=cat + + +cat <'text' >>EOO # Test program. + cat + text + EOO + + +$prog -o 'text' >>~%EOO% # Non-test program. + text + EOO + + test=$prog + + { + cat <'text' >'text'; # Non-test program. + + $* -o 'text' >>~%EOO% # Test program. + %.+/driver -o text% + text + EOO + } + } + EOI |