]> git.ipfire.org Git - thirdparty/bash.git/blame - tests/array14.sub
Bash-4.3 patch 7
[thirdparty/bash.git] / tests / array14.sub
CommitLineData
ac50fbac
CR
1# start at a test suite for negative indexed array subscripts -- post bash-4.2
2x=( 0 1 2 3 4 5)
3declare -p x
4
5unset 'x[-1]'
6declare -p x
7
8unset 'x[-2]'
9declare -p x
10
11unset 'x[-10]'
12
13x[-2]=3
14declare -p x
15
16x+=( five )
17declare -p x
18x[-1]=5
19declare -p x
20
21x+=( [-1]=foo )
22declare -p x
23
24x[-1]=5
25declare -p x
26
27x[-2]+=four
28declare -p x
29
30echo "strlen(${x[-2]})" = ${#x[-2]}