sh: Weaken some tests to allow /rescue/sh to pass everything.

/rescue/sh has a different _PATH_STDPATH which affects command -p.
This commit is contained in:
Jilles Tjoelker 2011-02-05 23:00:24 +00:00
parent c7ff3cee42
commit e029e397f3
3 changed files with 13 additions and 3 deletions

View File

@ -1,6 +1,12 @@
# $FreeBSD$
PATH=/var/empty
command -pV ls
case $(command -pV ls) in
*/var/empty/ls*)
echo "Failed: \$(command -pV ls) should not match */var/empty/ls*" ;;
"ls is"*" "/*/ls) ;;
*)
echo "Failed: \$(command -pV ls) match \"ls is\"*\" \"/*/ls" ;;
esac
command -pV true
command -pV /bin/ls

View File

@ -1,4 +1,3 @@
ls is /bin/ls
true is a shell builtin
/bin/ls is /bin/ls
fun is a shell function

View File

@ -24,6 +24,11 @@ check '"$(command -pv ld-elf.so.1; :)" = ""'
PATH=/libexec
check '"$(command -v ls)" = ""'
check '"$(command -pv ls)" = "/bin/ls"'
case $(command -pv ls) in
/*/ls) ;;
*)
echo "Failed: \$(command -pv ls) match /*/ls"
: $((failures += 1)) ;;
esac
exit $((failures > 0))