aboutsummaryrefslogtreecommitdiff
path: root/tests/builtin/echo.testscript
blob: ed08a2e587725f771f86ed1e41ddfe6495d25244 (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
# file      : tests/builtin/echo.testscript
# license   : MIT; see accompanying LICENSE file

test.arguments = "echo"

: string
:
$* foo >foo

: strings
:
$* foo bar >"foo bar"

: big
:
: Echo a big string (about 100K) to test that the builtin is asynchronous.
:
{
  s="--------------------------------";
  s="$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s";
  s="$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s";
  s="$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s";
  test.options += -i; # Pass the echo argument via the driver's stdin.
  $* <"$s" | cat >"$s"
}