mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-11-19 03:33:43 +03:00
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 ".".
This commit is contained in:
1 parent
50e837b1c4
commit
d9cf7c911f
1 file changed
+4
-8
+4
-8
@@ -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
|
||||
|
||||
|
||||
Reference in new issue
Block a user