about summary refs log tree commit diff
path: root/Test
diff options
context:
space:
mode:
authorPeter Stephenson <pws@zsh.org>2017-03-09 12:18:54 +0000
committerPeter Stephenson <pws@zsh.org>2017-03-09 12:18:54 +0000
commit018992123ed10cd5d5d95d94658b95964121fde4 (patch)
treeb1935b46ac4c35630272823e1c176eceb26e6887 /Test
parent64559abc1fdd375e5672a03c29c20a7a49259e29 (diff)
downloadzsh-018992123ed10cd5d5d95d94658b95964121fde4.tar.gz
zsh-018992123ed10cd5d5d95d94658b95964121fde4.tar.xz
zsh-018992123ed10cd5d5d95d94658b95964121fde4.zip
40803, 40804, 40805, 40806: Parameter test additions.
Potentially dodgy string for ${(z)...} splitting from Sebastian.

Check that $- and ${-} produce plausible results.
Diffstat (limited to 'Test')
-rw-r--r--Test/D04parameter.ztst14
1 files changed, 13 insertions, 1 deletions
diff --git a/Test/D04parameter.ztst b/Test/D04parameter.ztst
index fba95cc3a..cb9d50dc8 100644
--- a/Test/D04parameter.ztst
+++ b/Test/D04parameter.ztst
@@ -640,6 +640,11 @@
 >echo
 >$(|||) bar
 
+  foo=$'\x06ZUI\x1f text-field example: \x1azuitfieldtfield1_1\x1a\'\'\x1a\'\'\x1a1\x1aZUI\\[my_tfield1_width\\]\x1aZUI\\[my_tfield1_start\\]\x1aZUI\\[my_tfield1_data\\]\x1c'
+  print "${#${(z@)foo}}"
+0:Test real-world data that once seemed to fail
+>4
+
   psvar=(dog)
   setopt promptsubst
   foo='It shouldn'\''t $(happen) to a %1v.'
@@ -2055,7 +2060,7 @@
   a='~-/'; echo $~a
 0:Regression: "-" became Dash in workers/37689, breaking ~- expansion
 *>*
-F:We do not care what $OLDPWD is, as long as it doesn't cause an error
+F:We do not care what $OLDPWD is, as long as it does not cause an error
 
   (
   set -- one 'two three' four
@@ -2136,3 +2141,10 @@ F:We do not care what $OLDPWD is, as long as it doesn't cause an error
 >[one two three four]
 F:As of this writing, var=$@ and var="$@" with null IFS have unspecified
 F:behavior, see http://austingroupbugs.net/view.php?id=888
+
+  () {
+    setopt localoptions extendedglob
+    [[ $- = [[:alnum:]]## ]] || print Failed 1
+    [[ ${-} = [[:alnum:]]## ]] || print Failed 2
+  }
+0:$- expansion correctly handles Dash token