mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 00:32:25 -04:00
sh: Add test for shell script without '#!'.
This commit is contained in:
parent
3e0b768c63
commit
0df2165c11
1 changed files with 11 additions and 0 deletions
11
tools/regression/bin/sh/execution/shellproc1.0
Normal file
11
tools/regression/bin/sh/execution/shellproc1.0
Normal file
|
|
@ -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" ]
|
||||
Loading…
Reference in a new issue