diff --git a/tools/regression/bin/sh/builtins/command6.0 b/tools/regression/bin/sh/builtins/command6.0 index 0e6b5eea40e9..5b63bfecc0f0 100644 --- a/tools/regression/bin/sh/builtins/command6.0 +++ b/tools/regression/bin/sh/builtins/command6.0 @@ -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 diff --git a/tools/regression/bin/sh/builtins/command6.0.stdout b/tools/regression/bin/sh/builtins/command6.0.stdout index 4cb2b11fb490..df4d6474d84a 100644 --- a/tools/regression/bin/sh/builtins/command6.0.stdout +++ b/tools/regression/bin/sh/builtins/command6.0.stdout @@ -1,4 +1,3 @@ -ls is /bin/ls true is a shell builtin /bin/ls is /bin/ls fun is a shell function diff --git a/tools/regression/bin/sh/builtins/command7.0 b/tools/regression/bin/sh/builtins/command7.0 index 897a14cf6bc2..fc652f207584 100644 --- a/tools/regression/bin/sh/builtins/command7.0 +++ b/tools/regression/bin/sh/builtins/command7.0 @@ -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))