opnsense-src/bin/sh/tests/execution/shellproc1.0

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

11 lines
229 B
Text
Raw Permalink Normal View History

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" ]