aboutsummaryrefslogtreecommitdiff
path: root/tests/builtin/echo.testscript
blob: 562a14c31f2cf2eeb5bc09318bcaf156d7a2ae01 (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
# file      : tests/builtin/echo.testscript
# copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
# 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"
}