]> git.ipfire.org Git - thirdparty/bash.git/blame - tests/dstack2.tests
Bash-4.3 patch 7
[thirdparty/bash.git] / tests / dstack2.tests
CommitLineData
cce855bc
JA
1cd /
2
3echo expect '~1'
4echo ~1
5
6pushd /usr
7pushd /tmp
8dirs
9
10echo these lines should be the same
11dirs +0
12echo ~0 ${DIRSTACK[0]}
13echo these lines should be the same
14dirs +1
15echo ~1 ${DIRSTACK[1]}
16echo these lines should be the same
17dirs +2
18echo ~2 ${DIRSTACK[2]}
19
20NDIRS=$(( ${#DIRSTACK[@]} - 1 ))
21
22echo these lines should be the same
23dirs -2
24echo ~-2 ${DIRSTACK[NDIRS-2]}
25
26echo these lines should be the same
27dirs -1
28echo ~-1 ${DIRSTACK[NDIRS-1]}
29dirs -v -1
30
31echo these lines should be the same
32dirs -0
33echo ~-0 ${DIRSTACK[NDIRS]}