source: vendor/bash/3.1/tests/dstack2.tests

Last change on this file was 3228, checked in by bird, 18 years ago

bash 3.1

File size: 529 bytes
Line 
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]}
Note: See TracBrowser for help on using the repository browser.