about summary refs log tree commit diff
path: root/Test/D04parameter.ztst
diff options
context:
space:
mode:
authorPeter Stephenson <pws@zsh.org>2015-12-08 15:08:24 +0000
committerPeter Stephenson <pws@zsh.org>2015-12-08 15:08:24 +0000
commit7f5b2f570961cd9b20f322d7f45318878a1a4b29 (patch)
tree88b737db487626fb492473126c21fed356efc1e9 /Test/D04parameter.ztst
parent4105f79a3a9b5a85c4ce167865e5ac661be160dc (diff)
downloadzsh-7f5b2f570961cd9b20f322d7f45318878a1a4b29.tar.gz
zsh-7f5b2f570961cd9b20f322d7f45318878a1a4b29.tar.xz
zsh-7f5b2f570961cd9b20f322d7f45318878a1a4b29.zip
37348: Tests and fix for ${(q+)...}.
Needs dupstring() for empty string case.
Diffstat (limited to 'Test/D04parameter.ztst')
-rw-r--r--Test/D04parameter.ztst14
1 files changed, 14 insertions, 0 deletions
diff --git a/Test/D04parameter.ztst b/Test/D04parameter.ztst
index 1460ff6b6..bcea980ad 100644
--- a/Test/D04parameter.ztst
+++ b/Test/D04parameter.ztst
@@ -1866,3 +1866,17 @@
 >0
 >1 /somewhere
 >2 /random /value
+
+  print -r -- ${(q+):-}
+  print -r -- ${(q+)IFS}
+  print -r -- ${(q+):-oneword}
+  print -r -- ${(q+):-two words}
+  print -r -- ${(q+):-three so-called \'words\'}
+  (setopt rcquotes; print -r -- ${(q+):-three so-called \'words\'})
+0:${(q+)...}
+>''
+>$' \t\n\C-@'
+>oneword
+>'two words'
+>'three so-called '\''words'\'
+>'three so-called ''words'''