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:
parent
c7ff3cee42
commit
e029e397f3
@ -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
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
ls is /bin/ls
|
||||
true is a shell builtin
|
||||
/bin/ls is /bin/ls
|
||||
fun is a shell function
|
||||
|
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user