]> CyberLeo.Net >> Repos - FreeBSD/releng/9.2.git/blob - tools/regression/bin/sh/builtins/cd3.0
- Copy stable/9 to releng/9.2 as part of the 9.2-RELEASE cycle.
[FreeBSD/releng/9.2.git] / tools / regression / bin / sh / builtins / cd3.0
1 # $FreeBSD$
2
3 # If fully successful, cd -Pe must be like cd -P.
4
5 set -e
6
7 cd "${TMPDIR:-/tmp}"
8 cd -Pe /
9 [ "$PWD" = / ]
10 [ "$(pwd)" = / ]
11 cd "${TMPDIR:-/tmp}"
12 cd -eP /
13 [ "$PWD" = / ]
14 [ "$(pwd)" = / ]
15
16 set +e
17
18 # If cd -Pe cannot chdir, the exit status must be greater than 1.
19
20 v=$( (cd -Pe /var/empty/nonexistent) 2>&1 >/dev/null)
21 [ $? -gt 1 ] && [ -n "$v" ]