From b762c784caa78877a9949224af425e52db237beb Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Tue, 17 Jul 2018 14:21:38 +0200 Subject: hush: improve ${var#...}, ${var:+...} and ${var/.../...} - handle quoting dollar_altvalue1 test partially fails: word splitting of unquoted ${var:+...} is not correct function old new delta encode_then_expand_vararg - 443 +443 expand_one_var 1599 1610 +11 parse_stream 2756 2753 -3 encode_string 250 242 -8 setup_heredoc 308 298 -10 expand_and_evaluate_arith 106 96 -10 encode_then_expand_string 142 126 -16 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 1/5 up/down: 454/-47) Total: 407 bytes Signed-off-by: Denys Vlasenko --- shell/hush_test/hush-quoting/squote_in_varexp.tests | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'shell/hush_test/hush-quoting/squote_in_varexp.tests') diff --git a/shell/hush_test/hush-quoting/squote_in_varexp.tests b/shell/hush_test/hush-quoting/squote_in_varexp.tests index a2d05a246..4afc52107 100755 --- a/shell/hush_test/hush-quoting/squote_in_varexp.tests +++ b/shell/hush_test/hush-quoting/squote_in_varexp.tests @@ -1,6 +1,10 @@ x=yz echo ${x#'y'} echo "${x#'y'}" +echo ${x#"y"} +echo "${x#"y"}" echo ${x%'z'} echo "${x%'z'}" +echo ${x%"z"} +echo "${x%"z"}" echo Ok:$? -- cgit v1.2.3