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:
parent
55d2c5b573
commit
7cdc70f201
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=176522
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…
Reference in New Issue
Block a user