aboutsummaryrefslogtreecommitdiff
path: root/tests/test/script/runner/test-runner.testscript
blob: 772fa1b4d469458923d00f6768724909914a0313 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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