busybox/shell/ash_test/ash-quoting/mode_x.right
Denys Vlasenko 42ba757d5e ash: improve set -x to quote strings as necessary
Basen on the patch from Martijn Dekker <martijn@inlv.org>

function                                             old     new   delta
evalcommand                                         1161    1302    +141
maybe_single_quote                                     -      60     +60
getoptscmd                                           527     546     +19
readtoken1                                          2819    2823      +4
localcmd                                             366     364      -2
evaltreenr                                           495     479     -16
evaltree                                             495     479     -16
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 3/3 up/down: 224/-34)           Total: 190 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-07-21 13:20:14 +02:00

11 lines
212 B
Plaintext

+ var1=val
+ var2='one two'
+ true '%s\n' one 'two '"'"'three' four
+ this=command
+ 'this=command'
./mode_x.tests: line 1: this=command: not found
+ true
+ true
+ 'if' true
./mode_x.tests: line 1: if: not found