about summary refs log tree commit diff
path: root/Test
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2001-06-12 10:34:57 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2001-06-12 10:34:57 +0000
commitc26704f7a37f615820cebeacb763aa2748c290ec (patch)
tree0194a4aa367c7062578a90ca6dd00a8a7e253a83 /Test
parentae09302120db6252c50d9a3d4ba07960ee6a81b8 (diff)
downloadzsh-c26704f7a37f615820cebeacb763aa2748c290ec.tar.gz
zsh-c26704f7a37f615820cebeacb763aa2748c290ec.tar.xz
zsh-c26704f7a37f615820cebeacb763aa2748c290ec.zip
Added KSH_TYPESET option.
Diffstat (limited to 'Test')
-rw-r--r--Test/E01options.ztst38
1 files changed, 34 insertions, 4 deletions
diff --git a/Test/E01options.ztst b/Test/E01options.ztst
index 3e272509c..8ffba78b7 100644
--- a/Test/E01options.ztst
+++ b/Test/E01options.ztst
@@ -502,6 +502,22 @@
 >unset
 >globassign
 
+  setopt kshtypeset
+  ktvars=(ktv1 ktv2)
+  typeset ktfoo=`echo arg1 arg2` $ktvars
+  print $+ktv1 $+ktv2 $+ktv3
+  print $ktfoo
+  unsetopt kshtypeset
+  typeset noktfoo=`echo noktarg1 noktarg2`
+  print $noktfoo
+  print $+noktarg1 $+noktarg2
+  unset ktfoo ktv1 ktv2 noktfoo noktarg2
+0:KSH_TYPESET option
+>1 1 0
+>arg1 arg2
+>noktarg1
+>0 1
+
   showopt() { setopt | egrep 'localoptions|ksharrays'; }
   f1() { setopt localoptions ksharrays; showopt }
   f2() { setopt ksharrays; showopt }
@@ -526,14 +542,28 @@
 
 # LOCAL_TRAPS was tested in C03traps (phew).
 
-  fn() { local HOME=/any/old/name; print var=~ 'anything goes/here'=~; }
+  fn() {
+    local HOME=/any/old/name
+    print -l var=~ 'anything goes/here'=~ split=`echo maybe not`;
+  }
   setopt magicequalsubst
   fn
-  unsetopt magicequalsubst
+  setopt kshtypeset
+  fn
+  unsetopt magicequalsubst kshtypeset
   fn
 0:MAGIC_EQUAL_SUBST option
->var=/any/old/name anything goes/here=/any/old/name
->var=~ anything goes/here=~
+>var=/any/old/name
+>anything goes/here=/any/old/name
+>split=maybe
+>not
+>var=/any/old/name
+>anything goes/here=/any/old/name
+>split=maybe not
+>var=~
+>anything goes/here=~
+>split=maybe
+>not
 
   setopt MARK_DIRS
   print tmp*