summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjilles <jilles@FreeBSD.org>2011-02-02 22:03:18 +0000
committerjilles <jilles@FreeBSD.org>2011-02-02 22:03:18 +0000
commit0bf07f466d5ab61b8a3fd1f5eaccbca5a8a752d4 (patch)
treea634676bddfaab1afa1da9843fb468f5c93b73fd
parente252925aebb981b9bfd94ab666e64136b1c386f3 (diff)
downloadFreeBSD-src-0bf07f466d5ab61b8a3fd1f5eaccbca5a8a752d4.zip
FreeBSD-src-0bf07f466d5ab61b8a3fd1f5eaccbca5a8a752d4.tar.gz
sh: Add test for shell script without '#!'.
-rw-r--r--tools/regression/bin/sh/execution/shellproc1.011
1 files changed, 11 insertions, 0 deletions
diff --git a/tools/regression/bin/sh/execution/shellproc1.0 b/tools/regression/bin/sh/execution/shellproc1.0
new file mode 100644
index 0000000..1326bc2
--- /dev/null
+++ b/tools/regression/bin/sh/execution/shellproc1.0
@@ -0,0 +1,11 @@
+# $FreeBSD$
+
+T=`mktemp -d "${TMPDIR:-/tmp}/sh-test.XXXXXXXX"` || exit
+trap 'rm -rf "${T}"' 0
+cat <<EOF >"$T/testshellproc"
+printf 'this '
+echo is a test
+EOF
+chmod 755 "$T/testshellproc"
+PATH=$T:$PATH
+[ "`testshellproc`" = "this is a test" ]
OpenPOWER on IntegriCloud