about summary refs log tree commit diff
path: root/Test
diff options
context:
space:
mode:
authorPeter Stephenson <pws@zsh.org>2017-03-23 09:35:20 +0000
committerPeter Stephenson <pws@zsh.org>2017-03-23 09:35:20 +0000
commit086656241c3ccca377474bfea1cb269ac9a67d60 (patch)
tree14df959ce75426ebd08c44f028b8950a2bffc2b9 /Test
parent20d464944b8599e28044664a9adc8f349e3da5d4 (diff)
downloadzsh-086656241c3ccca377474bfea1cb269ac9a67d60.tar.gz
zsh-086656241c3ccca377474bfea1cb269ac9a67d60.tar.xz
zsh-086656241c3ccca377474bfea1cb269ac9a67d60.zip
22601: Fix for parameter substitution pattern matches.
It was not possible to math against a zero-length string in
some cases.
Diffstat (limited to 'Test')
-rw-r--r--Test/D04parameter.ztst10
1 files changed, 10 insertions, 0 deletions
diff --git a/Test/D04parameter.ztst b/Test/D04parameter.ztst
index cb9d50dc8..99f7dd91a 100644
--- a/Test/D04parameter.ztst
+++ b/Test/D04parameter.ztst
@@ -2148,3 +2148,13 @@ F:behavior, see http://austingroupbugs.net/view.php?id=888
     [[ ${-} = [[:alnum:]]## ]] || print Failed 2
   }
 0:$- expansion correctly handles Dash token
+
+  a=(1 "" 3)
+  print -rl -- "${(@)a//*/x}"
+  a=""
+  print -rl -- "${(@)a//*/y}"
+0:Zero-length string match in parameter substitution
+>x
+>x
+>x
+>y