diff options
author | jilles <jilles@FreeBSD.org> | 2011-02-02 22:03:18 +0000 |
---|---|---|
committer | jilles <jilles@FreeBSD.org> | 2011-02-02 22:03:18 +0000 |
commit | 0bf07f466d5ab61b8a3fd1f5eaccbca5a8a752d4 (patch) | |
tree | a634676bddfaab1afa1da9843fb468f5c93b73fd | |
parent | e252925aebb981b9bfd94ab666e64136b1c386f3 (diff) | |
download | FreeBSD-src-0bf07f466d5ab61b8a3fd1f5eaccbca5a8a752d4.zip FreeBSD-src-0bf07f466d5ab61b8a3fd1f5eaccbca5a8a752d4.tar.gz |
sh: Add test for shell script without '#!'.
-rw-r--r-- | tools/regression/bin/sh/execution/shellproc1.0 | 11 |
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" ] |