sh/tests: Add a second kind of binary scripts without #!
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
This commit is contained in:
parent
c949ba1d20
commit
52981a1694
@ -63,6 +63,7 @@ ${PACKAGE}FILES+= shellproc3.0
|
||||
${PACKAGE}FILES+= shellproc4.0
|
||||
${PACKAGE}FILES+= shellproc5.0
|
||||
${PACKAGE}FILES+= shellproc6.0
|
||||
${PACKAGE}FILES+= shellproc7.0
|
||||
${PACKAGE}FILES+= subshell1.0 subshell1.0.stdout
|
||||
${PACKAGE}FILES+= subshell2.0
|
||||
${PACKAGE}FILES+= subshell3.0
|
||||
|
10
bin/sh/tests/execution/shellproc7.0
Normal file
10
bin/sh/tests/execution/shellproc7.0
Normal file
@ -0,0 +1,10 @@
|
||||
# $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" ]
|
Loading…
Reference in New Issue
Block a user