pwd1.0 revision 206491
1# $FreeBSD: head/tools/regression/bin/sh/parameters/pwd1.0 206491 2010-04-11 20:21:34Z jilles $
2# Check that bogus PWD values are not accepted from the environment.
3
4cd / || exit 3
5failures=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
11exit $((failures != 0))
12