]> git.saurik.com Git - apple/shell_cmds.git/blame - sh/tests/parameters/pwd1.0
shell_cmds-203.tar.gz
[apple/shell_cmds.git] / sh / tests / parameters / pwd1.0
CommitLineData
deb63bfb 1# $FreeBSD: head/bin/sh/tests/parameters/pwd1.0 213738 2010-10-12 18:20:38Z obrien $
71aad674
A
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))