aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2019-07-10 14:12:45 -0700
committerRob Landley <rob@landley.net>2019-07-11 11:45:24 -0500
commit4be57ee021b3d3c8caf29af85261d7edcce227fb (patch)
tree907a53fefdc1f73f36f16a24c43ee39b2eb7869e /tests
parent0d754b823cfd6b9a9ed8f072277b1b5bea6e44a4 (diff)
downloadtoybox-4be57ee021b3d3c8caf29af85261d7edcce227fb.tar.gz
env.test: fix new test for toybox echo.
The test relied on the non-builtins not being toybox (or another multicall binary). A multicall binary will actually look at the symlinked name (in this case "true") and do what it says on the tin. Use a tiny shell script instead.
Diffstat (limited to 'tests')
-rwxr-xr-xtests/env.test4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/env.test b/tests/env.test
index 63b9094d..00b56540 100755
--- a/tests/env.test
+++ b/tests/env.test
@@ -23,6 +23,8 @@ testcmd "why is this allowed" "=BLAH env | grep '^=BLAH\$'" "=BLAH\n" "" ""
testcmd "replace" "A=foo PATH= `which printenv` A" "foo\n" "" ""
# env bypasses shell builtins
-ln -s "$(which echo)" true
+echo "#!$(which sh)
+echo \$@" > true
+chmod a+x true
testcmd "norecurse" 'env PATH="$PWD:$PATH" true hello' "hello\n" "" ""
rm true