about summary refs log tree commit diff
path: root/Test/E01options.ztst
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2010-10-22 16:32:36 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2010-10-22 16:32:36 +0000
commit3f3d80c394134cae020c49420917eb34a456ff68 (patch)
treeebf7140e93ee7fc2ea64a8843b2f770244e35ddf /Test/E01options.ztst
parent91564ce04c65576540a76612f6b292c9d574049f (diff)
downloadzsh-3f3d80c394134cae020c49420917eb34a456ff68.tar.gz
zsh-3f3d80c394134cae020c49420917eb34a456ff68.tar.xz
zsh-3f3d80c394134cae020c49420917eb34a456ff68.zip
28360: NO_UNSET option should check parameters with trailing options
Diffstat (limited to 'Test/E01options.ztst')
-rw-r--r--Test/E01options.ztst27
1 files changed, 25 insertions, 2 deletions
diff --git a/Test/E01options.ztst b/Test/E01options.ztst
index 410944643..be83ceccd 100644
--- a/Test/E01options.ztst
+++ b/Test/E01options.ztst
@@ -998,7 +998,7 @@
 >two
 >words
 
-  fn() { unset foo; print $foo; }
+  fn() { unset foo; print value is $foo; }
   setopt nounset
   print option unset unset by setting nounset
   eval fn
@@ -1008,9 +1008,32 @@
 0:UNSET option
 >option unset unset by setting nounset
 >option unset reset
->
+>value is
 ?fn: foo: parameter not set
 
+  fn1() { unset foo; print value 1 is ${foo#bar}; }
+  fn2() { unset foo; print value 2 is ${foo%bar}; }
+  fn3() { unset foo; print value 3 is ${foo/bar}; }
+  setopt nounset
+  print option unset unset by setting nounset
+  eval fn1
+  eval fn2
+  eval fn3
+  print option unset reset
+  setopt unset
+  fn1
+  fn2
+  fn3
+0:UNSET option with operators
+>option unset unset by setting nounset
+>option unset reset
+>value 1 is
+>value 2 is
+>value 3 is
+?fn1: foo: parameter not set
+?fn2: foo: parameter not set
+?fn3: foo: parameter not set
+
   fn() {
     emulate -L zsh
     setopt warncreateglobal