Add a regression test for cd.c's revision 1.35.
This commit is contained in:
parent
fe9202bf0f
commit
966480ec8b
17
tools/regression/bin/sh/builtins/cd1.0
Normal file
17
tools/regression/bin/sh/builtins/cd1.0
Normal 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}
|
Loading…
x
Reference in New Issue
Block a user