about summary refs log tree commit diff
path: root/Test/14array.ztst
diff options
context:
space:
mode:
authorWayne Davison <wayned@users.sourceforge.net>2000-06-02 10:14:42 +0000
committerWayne Davison <wayned@users.sourceforge.net>2000-06-02 10:14:42 +0000
commitb13c451ff37bb0f6a5cdfcfa579c10ed6cfa468f (patch)
tree4611e0f5891b6f735ab4b6d70837ac680ff29d6c /Test/14array.ztst
parent192dc1228a78de32591357c7c074bffe777c82f5 (diff)
downloadzsh-b13c451ff37bb0f6a5cdfcfa579c10ed6cfa468f.tar.gz
zsh-b13c451ff37bb0f6a5cdfcfa579c10ed6cfa468f.tar.xz
zsh-b13c451ff37bb0f6a5cdfcfa579c10ed6cfa468f.zip
Added some testing of glob-array indexing.
Diffstat (limited to 'Test/14array.ztst')
-rw-r--r--Test/14array.ztst20
1 files changed, 20 insertions, 0 deletions
diff --git a/Test/14array.ztst b/Test/14array.ztst
index 1cdf53c2d..35976899c 100644
--- a/Test/14array.ztst
+++ b/Test/14array.ztst
@@ -3,6 +3,8 @@
 %prep
 
   foo=(a b c d e f g)
+  mkdir array.tmp
+  touch array.tmp/{1..9}
 
 %test
 
@@ -75,3 +77,21 @@
   unsetopt ksh_arrays
 0:Ksh array indexing (iii)
 >.b c d e f g.
+
+  cd array.tmp
+  echo . ?([3,5]) .
+  cd ..
+0:Glob array indexing
+>. 3 4 5 .
+
+  cd array.tmp
+  echo . ?([2,-2]) .
+  cd ..
+0:Glob array indexing (ii)
+>. 2 3 4 5 6 7 8 .
+
+  cd array.tmp
+  echo . ?([-6,-4]) .
+  cd ..
+0:Glob array indexing (iii)
+>. 4 5 6 .