aboutsummaryrefslogtreecommitdiff
path: root/tests/test/script/builtin/echo.test
blob: 9e49a918ac49c56429b7773f78fe686c587e8cda (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/test/script/builtin/echo.test
# copyright : Copyright (c) 2014-2017 Code Synthesis Ltd
# license   : MIT; see accompanying LICENSE file

.include ../common.test

: string
:
$c <'echo foo >foo' && $b

: strings
:
$c <'echo foo bar >"foo bar"' && $b

: big
:
: Echo a big string (about 3MB) 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$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$s$s$s$s$s$s$s$s"
  $c <"echo '$s' | cat >'$s'" && $b
}