1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-15 15:06:42 +00:00

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

This commit is contained in:
Stefan Farfeleder 2008-02-24 16:52:02 +00:00
parent 55d2c5b573
commit 7cdc70f201
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=176522

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}