aboutsummaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorGravatar Matt Kraai <kraai@debian.org>2002-01-14 18:30:10 +0000
committerGravatar Matt Kraai <kraai@debian.org>2002-01-14 18:30:10 +0000
commita3181dd833970b1aa99087c3e3647387116547f0 (patch)
tree60f79ccf57bb1028f73230e677ad628b21f28d16 /testsuite
parentba552523fafaf687c6c6cf6113fe7b6c1b786920 (diff)
downloadbusybox-a3181dd833970b1aa99087c3e3647387116547f0.tar.gz
busybox-a3181dd833970b1aa99087c3e3647387116547f0.tar.bz2
Do not segfault if PATH is unset.
Diffstat (limited to 'testsuite')
-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 000000000..e2a2f3893
--- /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