sh: Add test for shell script without '#!'.
This commit is contained in:
parent
3e0b768c63
commit
0df2165c11
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 New Issue
Block a user