1206759Sjilles# $FreeBSD: releng/11.0/bin/sh/tests/parameters/pwd2.0 213738 2010-10-12 18:20:38Z obrien $ 2206759Sjilles# Check that PWD is exported and accepted from the environment. 3206759Sjillesset -e 4206759Sjilles 5206759SjillesT=$(mktemp -d ${TMPDIR:-/tmp}/sh-test.XXXXXX) 6206759Sjillestrap 'rm -rf $T' 0 7206759Sjillescd -P $T 8206759SjillesTP=$(pwd) 9206759Sjillesmkdir test1 10206759Sjillesln -s test1 link 11206759Sjillescd link 12206759Sjilles[ "$PWD" = "$TP/link" ] 13206759Sjilles[ "$(pwd)" = "$TP/link" ] 14206759Sjilles[ "$(pwd -P)" = "$TP/test1" ] 15213738Sobrien[ "$(${SH} -c pwd)" = "$TP/link" ] 16213738Sobrien[ "$(${SH} -c pwd\ -P)" = "$TP/test1" ] 17206759Sjillescd .. 18206759Sjilles[ "$(pwd)" = "$TP" ] 19206759Sjillescd -P link 20206759Sjilles[ "$PWD" = "$TP/test1" ] 21206759Sjilles[ "$(pwd)" = "$TP/test1" ] 22206759Sjilles[ "$(pwd -P)" = "$TP/test1" ] 23213738Sobrien[ "$(${SH} -c pwd)" = "$TP/test1" ] 24213738Sobrien[ "$(${SH} -c pwd\ -P)" = "$TP/test1" ] 25