mirror of
git://git.code.sf.net/p/zsh/code
synced 2024-11-19 13:33:52 +01:00
Added some testing of glob-array indexing.
This commit is contained in:
parent
192dc1228a
commit
b13c451ff3
@ -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 .
|
||||
|
Loading…
Reference in New Issue
Block a user