9 TESTSCRIPTS= nonexistshell devnullscript badinterplen goodscript \
10 scriptarg scriptarg-nospace
11 CLEANFILES= goodaout truncaout sparseaout empty ${TESTSCRIPTS}
13 all: ${PROG} goodaout ${TESTSCRIPTS}
15 .for x in ${TESTSCRIPTS}
21 regress: test-empty test-nonexist test-nonexistshell \
22 test-devnullscript test-badinterplen test-goodscript \
23 test-scriptarg test-scriptarg-nospace test-goodaout \
24 test-truncaout test-sparseaout
30 ${RP} empty | grep 'Exec format error'
32 test-nonexist: ${PROG}
33 ${RP} ${TD}/nonexistent | grep 'No such file or directory'
35 test-nonexistshell: ${PROG} nonexistshell
36 ${RP} nonexistshell | grep 'No such file or directory'
38 test-devnullscript: ${PROG} devnullscript
39 ${RP} devnullscript | grep 'Permission denied'
41 test-badinterplen: ${PROG} badinterplen
42 ${RP} badinterplen | grep 'No such file or directory'
44 test-goodscript: ${PROG} goodscript
45 ${RP} goodscript | grep 'succeeded'
47 test-scriptarg: ${PROG} scriptarg
48 ${RP} scriptarg 2>&1 | grep '+ echo succeeded'
50 test-scriptarg-nospace: ${PROG} scriptarg-nospace
51 ${RP} scriptarg-nospace 2>&1 | grep '+ echo succeeded'
53 goodaout: ${TD}/goodaout.c
54 ${CC} -static -o ${.TARGET} ${TD}/goodaout.c
56 test-goodaout: ${PROG} goodaout
57 ${RP} goodaout | grep 'succeeded'
59 test-truncaout: ${PROG} goodaout
60 truncate -s 16 truncaout
62 ${RP} truncaout | grep 'Exec format error'
64 test-sparseaout: ${PROG}
65 /bin/rm -rf sparseaout
66 truncate -s 20480 sparseaout
68 ${RP} sparseaout | grep 'Exec format error'
70 .include <bsd.prog.mk>