Merge branch 'vendor/LIBPCAP'
[dragonfly.git] / tools / regression / bin / sh / errors / bad-binary1.126
1 # $FreeBSD: src/tools/regression/bin/sh/errors/bad-binary1.126,v 1.1 2011/02/05 12:54:59 jilles Exp $
2 # Checking for binary "scripts" without magic number is permitted but not
3 # required by POSIX. However, it is preferable to getting errors like
4 # Syntax error: word unexpected (expecting ")")
5 # from trying to execute ELF binaries for the wrong architecture.
6
7 T=`mktemp -d "${TMPDIR:-/tmp}/sh-test.XXXXXXXX"` || exit
8 trap 'rm -rf "${T}"' 0
9 printf '\0echo bad\n' >"$T/testshellproc"
10 chmod 755 "$T/testshellproc"
11 PATH=$T:$PATH
12 testshellproc 2>/dev/null