]> git.saurik.com Git - apple/shell_cmds.git/blame - sh/tests/execution/path1.0
shell_cmds-216.60.1.tar.gz
[apple/shell_cmds.git] / sh / tests / execution / path1.0
CommitLineData
deb63bfb 1# $FreeBSD: head/bin/sh/tests/execution/path1.0 217206 2011-01-09 21:07:30Z jilles $
71aad674
A
2# Some builtins should not be overridable via PATH.
3
4set -e
5T=$(mktemp -d ${TMPDIR:-/tmp}/sh-test.XXXXXX)
6trap 'rm -rf ${T}' 0
7echo '#!/bin/sh
8echo bad' >"$T/cd"
9chmod 755 "$T/cd"
10cd /bin
11oPATH=$PATH
12PATH=$T:$PATH:%builtin
13cd /
14PATH=$oPATH
15[ "$(pwd)" = / ]