summaryrefslogtreecommitdiff
path: root/testsuite/which/which-uses-default-path
diff options
context:
space:
mode:
authorMatt Kraai2002-01-14 18:30:10 +0000
committerMatt Kraai2002-01-14 18:30:10 +0000
commita3181dd833970b1aa99087c3e3647387116547f0 (patch)
tree60f79ccf57bb1028f73230e677ad628b21f28d16 /testsuite/which/which-uses-default-path
parentba552523fafaf687c6c6cf6113fe7b6c1b786920 (diff)
downloadbusybox-a3181dd833970b1aa99087c3e3647387116547f0.zip
busybox-a3181dd833970b1aa99087c3e3647387116547f0.tar.gz
Do not segfault if PATH is unset.
Diffstat (limited to 'testsuite/which/which-uses-default-path')
-rw-r--r--testsuite/which/which-uses-default-path8
1 files changed, 8 insertions, 0 deletions
diff --git a/testsuite/which/which-uses-default-path b/testsuite/which/which-uses-default-path
new file mode 100644
index 0000000..e2a2f38
--- /dev/null
+++ b/testsuite/which/which-uses-default-path
@@ -0,0 +1,8 @@
+BUSYBOX=$(type -p busybox)
+echo $BUSYBOX
+SAVED_PATH=$PATH
+unset PATH
+$BUSYBOX which ls
+STATUS=$?
+export PATH=$SAVED_PATH
+return $STATUS