5 # error -- nonexistant directory
6 pushd /tmp/xxx-notthere
8 # errors -- empty stack
12 # errors -- bad numeric arguments -- should not cause the script to exit
19 unalias cd 2>/dev/null
24 command pwd -P # better be `/'
28 *) echo oops -- bad \$OLDPWD ;;
36 # this should not change the directory stack at all
48 # two consecutive `pushd's should swap the top two stack elements, then
49 # swap them back, leaving the stack intact
54 echo ${DIRSTACK[0]} ; dirs +0
55 echo ${DIRSTACK[2]} ; dirs +2
57 # these should be errors, but not affect the directory stack
86 # this is for the benefit of pure coverage