Sindbad~EG File Manager

Current Path : /usr/tests/bin/sh/builtins/
Upload File :
Current File : //usr/tests/bin/sh/builtins/cd3.0

# $FreeBSD$

# If fully successful, cd -Pe must be like cd -P.

set -e

cd "${TMPDIR:-/tmp}"
cd -Pe /
[ "$PWD" = / ]
[ "$(pwd)" = / ]
cd "${TMPDIR:-/tmp}"
cd -eP /
[ "$PWD" = / ]
[ "$(pwd)" = / ]

set +e

# If cd -Pe cannot chdir, the exit status must be greater than 1.

v=$( (cd -Pe /var/empty/nonexistent) 2>&1 >/dev/null)
[ $? -gt 1 ] && [ -n "$v" ]

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists