1# Some builtins should not be overridable via PATH.
2
3set -e
4T=$(mktemp -d ${TMPDIR:-/tmp}/sh-test.XXXXXX)
5trap 'rm -rf ${T}' 0
6echo '#!/bin/sh
7echo bad' >"$T/cd"
8chmod 755 "$T/cd"
9cd /bin
10oPATH=$PATH
11PATH=$T:$PATH:%builtin
12cd /
13PATH=$oPATH
14[ "$(pwd)" = / ]
15