about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Stephenson <pws@zsh.org>2014-10-13 11:38:48 +0100
committerPeter Stephenson <pws@zsh.org>2014-10-13 11:38:48 +0100
commit66320ca93a717467a0ed0d34da4c06257953aa50 (patch)
treea173101200a32693771977d2ce90f1d6375887a9
parent03241e50b00858c4ebd285cadc1abfcb965f25ce (diff)
downloadzsh-66320ca93a717467a0ed0d34da4c06257953aa50.tar.gz
zsh-66320ca93a717467a0ed0d34da4c06257953aa50.tar.xz
zsh-66320ca93a717467a0ed0d34da4c06257953aa50.zip
33459: test for variable substitution in variable splitting
-rw-r--r--ChangeLog5
-rw-r--r--Test/D04parameter.ztst20
2 files changed, 25 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index d19cb8d08..37c751557 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2014-10-13  Peter Stephenson  <p.stephenson@samsung.com>
+
+	* 33459: Test/D04parameter.ztst: test for variable substitution
+	in variable splitting.
+
 2014-10-13  Oliver Kiddle  <opk@zsh.org>
 
 	* 33438: Completion/Base/Utility/_sequence: use the new way of
diff --git a/Test/D04parameter.ztst b/Test/D04parameter.ztst
index 49dcea901..d7f39cb37 100644
--- a/Test/D04parameter.ztst
+++ b/Test/D04parameter.ztst
@@ -1636,3 +1636,23 @@
   print ${noexist:^foo})
 1:Zipping arrays, NO_UNSET part 2
 ?(eval):2: noexist: parameter not set
+
+  expr="a@b,c@d:e@f,g@h:i@j,k@l"
+  for sep in : , @; do
+    print -l ${(ps.$sep.)expr}
+  done
+0:Use of variable to get separator when splitting parameter
+>a@b,c@d
+>e@f,g@h
+>i@j,k@l
+>a@b
+>c@d:e@f
+>g@h:i@j
+>k@l
+>a
+>b,c
+>d:e
+>f,g
+>h:i
+>j,k
+>l