1
0
mirror of git://git.code.sf.net/p/zsh/code synced 2024-11-20 05:53:52 +01:00
zsh/Test/14array.ztst

52 lines
532 B
Plaintext
Raw Normal View History

2000-06-02 03:35:54 +02:00
# Tests for array indexing
%prep
foo=(a b c d e f g)
%test
echo .$foo[1,4].
0:Array indexing
>.a b c d.
echo .$foo[1,-5].
0:Array indexing
>.a b c.
echo .$foo[4,1].
0:Array indexing
>..
echo .$foo[0,0].
0:Array indexing
>.a.
echo .$foo[0].
0:Array indexing
>.a.
echo .$foo[1].
0:Array indexing
>.a.
echo .$foo[3].
0:Array indexing
>.c.
echo .$foo[0,1].
0:Array indexing
>.a.
echo .$foo[2,2].
0:Array indexing
>.b.
echo .$foo[1,0].
0:Array indexing
>..
echo .$foo[-4,5].
0:Array indexing
>.d e.