summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorjilles <jilles@FreeBSD.org>2011-02-05 23:00:24 +0000
committerjilles <jilles@FreeBSD.org>2011-02-05 23:00:24 +0000
commit3cc91012bda1e2ff3b97420def74ffcf80368564 (patch)
treea1ac816088a570cfb8774db1eb9d3a1cbd45a10c /tools
parent146115253f3035e216cee01ddd35a067188add39 (diff)
downloadFreeBSD-src-3cc91012bda1e2ff3b97420def74ffcf80368564.zip
FreeBSD-src-3cc91012bda1e2ff3b97420def74ffcf80368564.tar.gz
sh: Weaken some tests to allow /rescue/sh to pass everything.
/rescue/sh has a different _PATH_STDPATH which affects command -p.
Diffstat (limited to 'tools')
-rw-r--r--tools/regression/bin/sh/builtins/command6.08
-rw-r--r--tools/regression/bin/sh/builtins/command6.0.stdout1
-rw-r--r--tools/regression/bin/sh/builtins/command7.07
3 files changed, 13 insertions, 3 deletions
diff --git a/tools/regression/bin/sh/builtins/command6.0 b/tools/regression/bin/sh/builtins/command6.0
index 0e6b5ee..5b63bfe 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 4cb2b11..df4d647 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 897a14c..fc652f2 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))
OpenPOWER on IntegriCloud