From dcd4f02845cba2a19895e03b53e9dcea1817d3ad Mon Sep 17 00:00:00 2001 From: "Barton E. Schaefer" Date: Tue, 17 Oct 2017 20:29:47 -0700 Subject: 41902: ${(z)...} continues parsing on unmatched quote when CSH_JUNKIE_QUOTES is set Tests for 41902 and 41873 --- Test/D04parameter.ztst | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'Test/D04parameter.ztst') diff --git a/Test/D04parameter.ztst b/Test/D04parameter.ztst index 5ffaaa126..3b187f492 100644 --- a/Test/D04parameter.ztst +++ b/Test/D04parameter.ztst @@ -2401,3 +2401,24 @@ F:behavior, see http://austingroupbugs.net/view.php?id=888 0:Append to element of associative array on creation >one >howsyourfathertoday + + local b=$'a+=(${(o)$(ls -1 \'.*\' | perl -alne \'\nEND{ print " "; }\'\n)})' + printf ': %s\n' "${(@Z+cn+)b}" +0:(Z) flag splitting with $( closed after embedded newline +>: a+=( +>: ${(o)$(ls -1 '.*' | perl -alne ' +>END{ print " "; }' +>)} +>: ) + + local b=$'# \' single\n# \" double\n# ` backtick\nword' + (setopt CSH_JUNKIE_QUOTES + printf ': %s\n' "${(@Z+n+)b}") +0:(z) flag with CSH_JUNKIE_QUOTES +>: # +>: ' single +>: # +>: " double +>: # +>: ` backtick +>: word -- cgit 1.4.1