about summary refs log tree commit diff
path: root/Test/D04parameter.ztst
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2010-02-27 00:18:13 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2010-02-27 00:18:13 +0000
commit21193d7f0128dc66f4c41c7b06d1d20c5b9339fc (patch)
tree63fef850d047a07a8bd31b5c8cca124f8e74297e /Test/D04parameter.ztst
parent31123a118472ee4e4afbfae5dff904bb40113e65 (diff)
downloadzsh-21193d7f0128dc66f4c41c7b06d1d20c5b9339fc.tar.gz
zsh-21193d7f0128dc66f4c41c7b06d1d20c5b9339fc.tar.xz
zsh-21193d7f0128dc66f4c41c7b06d1d20c5b9339fc.zip
users/14905 + 14906: problems with :s in parameter expansion
Diffstat (limited to 'Test/D04parameter.ztst')
-rw-r--r--Test/D04parameter.ztst26
1 files changed, 26 insertions, 0 deletions
diff --git a/Test/D04parameter.ztst b/Test/D04parameter.ztst
index 59fa3ac91..f81b7de1d 100644
--- a/Test/D04parameter.ztst
+++ b/Test/D04parameter.ztst
@@ -947,6 +947,32 @@
 >/
 >/
 
+  baz=foo/bar
+  zab=oof+rab
+  print ${baz:s/\//+/}
+  print "${baz:s/\//+/}"
+  print ${zab:s/+/\//}
+  print "${zab:s/+/\//}"
+0:Quoting of separator in substitution modifier
+>foo+bar
+>foo+bar
+>oof/rab
+>oof/rab
+
+  print -r ${${:-one/two}:s,/,X&Y,}
+  print -r ${${:-one/two}:s,/,X\&Y,}
+  print -r ${${:-one/two}:s,/,X\\&Y,}
+  print -r "${${:-one/two}:s,/,X&Y,}"
+  print -r "${${:-one/two}:s,/,X\&Y,}"
+  print -r "${${:-one/two}:s,/,X\\&Y,}"
+0:Quoting of ampersand in substitution modifier RHS
+>oneX/Ytwo
+>oneX&Ytwo
+>oneX\/Ytwo
+>oneX/Ytwo
+>oneX&Ytwo
+>oneX\/Ytwo
+
   nully=($'a\0c' $'a\0b\0b' $'a\0b\0a' $'a\0b\0' $'a\0b' $'a\0' $'a')
   for string in ${(o)nully}; do
     for (( i = 1; i <= ${#string}; i++ )); do