Add a regression test for cd.c's revision 1.35.

This commit is contained in:
stefanf 2008-02-24 16:52:02 +00:00
parent fe9202bf0f
commit 966480ec8b

View File

@ -0,0 +1,17 @@
# $FreeBSD$
set -e
PDIR=${TMPDIR:-/tmp}
cd ${PDIR}
TMPDIR=$(mktemp -d sh-test.XXXXXX)
chmod 0 ${TMPDIR}
cd -L ${TMPDIR} 2>/dev/null && exit 1
[ "${PWD}" = "${PDIR}" ]
[ "$(pwd)" = "${PDIR}" ]
cd -P ${TMPDIR} 2>/dev/null && exit 1
[ "${PWD}" = "${PDIR}" ]
[ "$(pwd)" = "${PDIR}" ]
chmod 755 ${TMPDIR}
rmdir ${TMPDIR}