1*54e81d41Sbluhm# $OpenBSD: Makefile,v 1.2 2018/04/01 11:07:52 bluhm Exp $ 276f6aa52Stobias 3*54e81d41SbluhmAPPLY?= /usr/bin/apply 476f6aa52StobiasCLEANFILES= *.res 576f6aa52Stobias 676f6aa52StobiasREGRESS_TARGETS=t1 t2 t3 t4 t5 t6 776f6aa52Stobias 876f6aa52Stobias# .in: input file 976f6aa52Stobias# .out: desired output 1076f6aa52Stobias 1176f6aa52Stobias# t1: uses arguments multiple times (from FreeBSD bin/95079) 1276f6aa52Stobias# t2: overflows ARG_MAX (from FreeBSD bin/95079) 1376f6aa52Stobias# t3: debugs -0 call 1476f6aa52Stobias# t4: debugs -2 call 1576f6aa52Stobias# t5: uses magic character '&' 1676f6aa52Stobias# t6: uses magic character ' ' with command starting with a number 1776f6aa52Stobias 1876f6aa52Stobiast1: 1976f6aa52Stobias @echo ${*} 20*54e81d41Sbluhm ${APPLY} "echo %1 %1 %1 %1" `cat ${.CURDIR}/${*}.in` > ${*}.res 21*54e81d41Sbluhm @cmp -s ${.CURDIR}/${*}.out ${*}.res || \ 2276f6aa52Stobias (echo "XXX ${*} failed" && false) 2376f6aa52Stobias 2476f6aa52Stobiast2: 2576f6aa52Stobias @echo ${*} 26*54e81d41Sbluhm ARG_MAX=`getconf ARG_MAX`;\ 2776f6aa52Stobias ARG_MAX_HALF=$$((ARG_MAX / 2)); \ 2876f6aa52Stobias ! ${APPLY} "echo %1 %1 %1" \ 2976f6aa52Stobias `jot $$ARG_MAX_HALF 1 1 | tr -d '\n'` > ${*}.res 2>&1 3076f6aa52Stobias 3176f6aa52Stobiast3: 3276f6aa52Stobias @echo ${*} 33*54e81d41Sbluhm ${APPLY} -0 -d who 1 2 3 4 5 > ${*}.res 34*54e81d41Sbluhm @cmp -s ${.CURDIR}/${*}.out ${*}.res || \ 3576f6aa52Stobias (echo "XXX ${*} failed" && false) 3676f6aa52Stobias 3776f6aa52Stobiast4: 3876f6aa52Stobias @echo ${*} 39*54e81d41Sbluhm ${APPLY} -2 -d cmp a1 b1 a2 b2 a3 b3 > ${*}.res 40*54e81d41Sbluhm @cmp -s ${.CURDIR}/${*}.out ${*}.res || \ 4176f6aa52Stobias (echo "XXX ${*} failed" && false) 4276f6aa52Stobias 4376f6aa52Stobiast5: 4476f6aa52Stobias @echo ${*} 45*54e81d41Sbluhm ${APPLY} -a "&" "echo &2 &1" hello world > ${*}.res 46*54e81d41Sbluhm @cmp -s ${.CURDIR}/${*}.out ${*}.res || \ 4776f6aa52Stobias (echo "XXX ${*} failed" && false) 4876f6aa52Stobias 4976f6aa52Stobiast6: 5076f6aa52Stobias @echo ${*} 51*54e81d41Sbluhm ${APPLY} -a " " -d "2to3 1" test.py > ${*}.res 52*54e81d41Sbluhm @cmp -s ${.CURDIR}/${*}.out ${*}.res || \ 5376f6aa52Stobias (echo "XXX ${*} failed" && false) 5476f6aa52Stobias 5576f6aa52Stobias.include <bsd.regress.mk> 56