summaryrefslogtreecommitdiff
path: root/tests/misc
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2009-10-25 16:21:40 +0100
committerJim Meyering <meyering@redhat.com>2009-10-26 09:59:32 +0100
commitd9cf7c911f2d5aba6ae04615d179fb2aaf3f06d9 (patch)
tree91acf096bc8a45dd2d60afa3b816dd3780af94fa /tests/misc
parent50e837b1c454e7eb50d0fc67e7f16668b3e288aa (diff)
downloadcoreutils-d9cf7c911f2d5aba6ae04615d179fb2aaf3f06d9.tar.xz
tests: adjust new env test not to fail
* tests/misc/env: Create ./-i as a link to our "echo" binary, rather than as a bourne shell script, so that env can exec it. Set PATH to ".".
Diffstat (limited to 'tests/misc')
-rwxr-xr-xtests/misc/env12
1 files changed, 4 insertions, 8 deletions
diff --git a/tests/misc/env b/tests/misc/env
index a3d435b48..1e0a22eae 100755
--- a/tests/misc/env
+++ b/tests/misc/env
@@ -86,17 +86,13 @@ EOF
compare exp out || fail=1
# Use -- to end arguments.
-cat <<EOF >./-i || framework_failure
-#!/bin/sh
-echo pass
-EOF
-chmod +x ./-i || framework_failure
-case `env -i PATH="$PATH" echo good` in
+ln -s "$abs_top_builddir/src/echo" ./-i || framework_failure
+case `PATH="$PATH:" env -i echo good` in
good) ;;
*) fail=1 ;;
esac
-case `env -- -i PATH="$PATH" echo fail` in
- pass) ;;
+case `env -i -- PATH=. -i no-echo` in
+ no-echo) ;;
*) fail=1 ;;
esac