1
0
mirror of git://git.code.sf.net/p/zsh/code synced 2024-11-19 13:33:52 +01:00

Some simple array indexing tests.

This commit is contained in:
Wayne Davison 2000-06-02 01:35:54 +00:00
parent b40a5006c0
commit a5d9467cfa

51
Test/14array.ztst Normal file

@ -0,0 +1,51 @@
# 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.