]>
Commit | Line | Data |
---|---|---|
71aad674 A |
1 | # $FreeBSD$ |
2 | # Check that PWD is exported and accepted from the environment. | |
3 | set -e | |
4 | ||
5 | T=$(mktemp -d ${TMPDIR:-/tmp}/sh-test.XXXXXX) | |
6 | trap 'rm -rf $T' 0 | |
7 | cd -P $T | |
8 | TP=$(pwd) | |
9 | mkdir test1 | |
10 | ln -s test1 link | |
11 | cd 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" ] | |
17 | cd .. | |
18 | [ "$(pwd)" = "$TP" ] | |
19 | cd -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" ] |