]> CyberLeo.Net >> Repos - FreeBSD/stable/8.git/blob - tools/regression/bin/sh/builtins/cd1.0
Copy head to stable/8 as part of 8.0 Release cycle.
[FreeBSD/stable/8.git] / tools / regression / bin / sh / builtins / cd1.0
1 # $FreeBSD$
2 set -e
3
4 PDIR=${TMPDIR:-/tmp}
5 cd ${PDIR}
6 TMPDIR=$(mktemp -d sh-test.XXXXXX)
7 chmod 0 ${TMPDIR}
8
9 cd -L ${TMPDIR} 2>/dev/null && exit 1
10 [ "${PWD}" = "${PDIR}" ]
11 [ "$(pwd)" = "${PDIR}" ]
12 cd -P ${TMPDIR} 2>/dev/null && exit 1
13 [ "${PWD}" = "${PDIR}" ]
14 [ "$(pwd)" = "${PDIR}" ]
15
16 chmod 755 ${TMPDIR}
17 rmdir ${TMPDIR}