busybox/shell/hush_test/hush-heredoc/herestring1.tests
Denys Vlasenko 3e766dce5f hush: implement <<<here_string syntax
function                                             old     new   delta
setup_heredoc                                        299     351     +52
parse_stream                                        2514    2540     +26
parse_redirect                                       335     351     +16
redir_table                                           40      48      +8
static.setup_redirects                               394     400      +6
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 5/0 up/down: 108/0)             Total: 108 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2025-08-15 00:08:11 +02:00

35 lines
466 B
Text
Executable file

cat <<<one
cat <<<\_two
cat <<<"\_three"
cat <<<'\_four'
cat <<<\\_two
cat <<<"\\_three"
cat <<<'\\_four'
cat <<<$'two_newlines\n'
cat <<</bin/c*
cat <<<star_*
cat <<<star_\*
cat <<<"star_*"
cat <<<"star_\*"
cat <<<'star_*'
cat <<<'star_\*'
var=$'line1
line2
line3'
cat <<<$var
cat <<<"$var"
i=10
until test $((--i)) = 0; do
cat <<<$((2**i))
done
a=qwerty
cat <<<`echo v'-$a-\t-\\-\"-\x-\`-\--\z-\*-\?-'`
cat <<<"`echo v'-$a-\t-\\-\"-\x-\`-\--\z-\*-\?-'`"