]>
Commit | Line | Data |
---|---|---|
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 | ||
4 | set -e | |
5 | T=$(mktemp -d ${TMPDIR:-/tmp}/sh-test.XXXXXX) | |
6 | trap 'rm -rf ${T}' 0 | |
7 | echo '#!/bin/sh | |
8 | echo bad' >"$T/cd" | |
9 | chmod 755 "$T/cd" | |
10 | cd /bin | |
11 | oPATH=$PATH | |
12 | PATH=$T:$PATH:%builtin | |
13 | cd / | |
14 | PATH=$oPATH | |
15 | [ "$(pwd)" = / ] |