]> CyberLeo.Net >> Repos - FreeBSD/releng/8.1.git/blob - tools/regression/bin/sh/parameters/pwd1.0
Copy stable/8 to releng/8.1 in preparation for 8.1-RC1.
[FreeBSD/releng/8.1.git] / tools / regression / bin / sh / parameters / pwd1.0
1 # $FreeBSD$
2 # Check that bogus PWD values are not accepted from the environment.
3
4 cd / || exit 3
5 failures=0
6 [ "$(PWD=foo sh -c 'pwd')" = / ] || : $((failures += 1))
7 [ "$(PWD=/var/empty sh -c 'pwd')" = / ] || : $((failures += 1))
8 [ "$(PWD=/var/empty/foo sh -c 'pwd')" = / ] || : $((failures += 1))
9 [ "$(PWD=/bin/ls sh -c 'pwd')" = / ] || : $((failures += 1))
10
11 exit $((failures != 0))