diff options
author | Paul Ackersviller <packersv@users.sourceforge.net> | 2007-06-25 03:11:44 +0000 |
---|---|---|
committer | Paul Ackersviller <packersv@users.sourceforge.net> | 2007-06-25 03:11:44 +0000 |
commit | f2f3b86a5f15500dfee707d27eee9784a1626e4d (patch) | |
tree | d58c84a358497843dbdf54088e4e441bbf9447e1 /Test/D04parameter.ztst | |
parent | 3fb7cb46276374c248d24802e04d0947743d2d8d (diff) | |
download | zsh-f2f3b86a5f15500dfee707d27eee9784a1626e4d.tar.gz zsh-f2f3b86a5f15500dfee707d27eee9784a1626e4d.tar.xz zsh-f2f3b86a5f15500dfee707d27eee9784a1626e4d.zip |
Merge of 21862/21863/21870: GLOB_SUBST shouldn't swallow up backslashes in
parameter substitutions that don't match anything.
Diffstat (limited to 'Test/D04parameter.ztst')
-rw-r--r-- | Test/D04parameter.ztst | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Test/D04parameter.ztst b/Test/D04parameter.ztst index 3ad19368d..6abba0ab3 100644 --- a/Test/D04parameter.ztst +++ b/Test/D04parameter.ztst @@ -196,6 +196,20 @@ >* boringfile evenmoreboringfile boringfile evenmoreboringfile >boringfile evenmoreboringfile +# The following tests a bug where globsubst didn't preserve +# backslashes when printing out the original string. + str1='\\*\\' + ( + setopt globsubst nonomatch + [[ \\\\ = $str1 ]] && print -r '\\ matched by' $str1 + [[ \\foo\\ = $str1 ]] && print -r '\\foo matched by' $str1 + [[ a\\b\\ = $str1 ]] || print -r 'a\\b not matched by' $str1 + ) +0:globsubst with backslashes +>\\ matched by \\*\\ +>\\foo matched by \\*\\ +>a\\b not matched by \\*\\ + print -l "${$(print one word)}" "${=$(print two words)}" 0:splitting of $(...) inside ${...} >one word |