mirror of
https://github.com/opnsense/src.git
synced 2026-02-16 00:58:21 -05:00
One of the reasons for git commit
e0f5c1387d was to make "actually portable
executables" work. Add a test that is more like those.
MFC after: 1 week
10 lines
335 B
Text
10 lines
335 B
Text
# $FreeBSD$
|
|
# Non-POSIX trickery that is widely supported,
|
|
# used by https://justine.lol/ape.html
|
|
|
|
T=`mktemp -d "${TMPDIR:-/tmp}/sh-test.XXXXXXXX"` || exit
|
|
trap 'rm -rf "${T}"' 0
|
|
printf "MZqFpD='\n\0'\n#'\"\necho this is a test\n" >"$T/testshellproc"
|
|
chmod 755 "$T/testshellproc"
|
|
PATH=$T:$PATH
|
|
[ "`testshellproc`" = "this is a test" ]
|