aboutsummaryrefslogtreecommitdiffstats
path: root/tests/execscript
diff options
context:
space:
mode:
authorJari Aalto <jari.aalto@cante.net>2004-07-27 13:29:18 +0000
committerJari Aalto <jari.aalto@cante.net>2009-09-12 16:46:56 +0000
commitb80f6443b6b7b620c7272664c66ecb0b120a0998 (patch)
tree9f71c98d8fe8fa0f41d95e1eb4227f32a09d43ca /tests/execscript
parent7117c2d221b2aed4ede8600f6a36b7c1454b4f55 (diff)
downloadandroid_external_bash-b80f6443b6b7b620c7272664c66ecb0b120a0998.tar.gz
android_external_bash-b80f6443b6b7b620c7272664c66ecb0b120a0998.tar.bz2
android_external_bash-b80f6443b6b7b620c7272664c66ecb0b120a0998.zip
Imported from ../bash-3.0.tar.gz.
Diffstat (limited to 'tests/execscript')
-rw-r--r--tests/execscript14
1 files changed, 12 insertions, 2 deletions
diff --git a/tests/execscript b/tests/execscript
index 7eab4af..61722f2 100644
--- a/tests/execscript
+++ b/tests/execscript
@@ -1,7 +1,7 @@
export LC_ALL=C
export LANG=C
-if (( $UID == 0 )); then
+if [ $UID -eq 0 ]; then
echo "execscript: the test suite should not be run as root" >&2
fi
@@ -21,8 +21,15 @@ notthere
echo $?
# this is iffy, since the error messages may vary from system to system
-${THIS_SH} notthere
+# and /tmp might not exist
+ln -s ${THIS_SH} /tmp/bash 2>/dev/null
+if [ -f /tmp/bash ]; then
+ /tmp/bash notthere
+else
+ ${THIS_SH} notthere
+fi
echo $?
+rm -f /tmp/bash
# /bin/sh should be there on all systems
${THIS_SH} /bin/sh
@@ -94,3 +101,6 @@ ${THIS_SH} -c 'cat </dev/null | cat >/dev/null' >&-
# values
${THIS_SH} ./exec6.sub
+
+# checks for properly deciding what constitutes an executable file
+${THIS_SH} ./exec7.sub