pwd2.0 revision 259210
1# $FreeBSD: head/bin/sh/tests/parameters/pwd2.0 213738 2010-10-12 18:20:38Z obrien $ 2# Check that PWD is exported and accepted from the environment. 3set -e 4 5T=$(mktemp -d ${TMPDIR:-/tmp}/sh-test.XXXXXX) 6trap 'rm -rf $T' 0 7cd -P $T 8TP=$(pwd) 9mkdir test1 10ln -s test1 link 11cd link 12[ "$PWD" = "$TP/link" ] 13[ "$(pwd)" = "$TP/link" ] 14[ "$(pwd -P)" = "$TP/test1" ] 15[ "$(${SH} -c pwd)" = "$TP/link" ] 16[ "$(${SH} -c pwd\ -P)" = "$TP/test1" ] 17cd .. 18[ "$(pwd)" = "$TP" ] 19cd -P link 20[ "$PWD" = "$TP/test1" ] 21[ "$(pwd)" = "$TP/test1" ] 22[ "$(pwd -P)" = "$TP/test1" ] 23[ "$(${SH} -c pwd)" = "$TP/test1" ] 24[ "$(${SH} -c pwd\ -P)" = "$TP/test1" ] 25