1*141b108eSmillert# $OpenBSD: Makefile,v 1.9 2024/08/28 14:32:02 millert Exp $ 214274383Smillert# $NetBSD: Makefile,v 1.1 2005/04/04 16:48:45 peter Exp $ 314274383Smillert 4e47cfd50SjasperSED?= /usr/bin/sed 514274383Smillert 6e47cfd50SjasperREGRESS_TARGETS= sedtest substitute hanoi math sierpinski negation \ 7*141b108eSmillert inplace inplace2 inplace3 commandl1 commandl2 commandc1 commandD1 \ 8*141b108eSmillert commandD2 9cd65ed77Smillert 10eaf3b488Smartijncommandc1: 11d02a8fbeSbluhm # New tests, currently failing, need fixes in sed. 12d02a8fbeSbluhm @echo DISABLED 13d02a8fbeSbluhm 14cd65ed77Smillertsedtest: 15cd65ed77Smillert sh ${.CURDIR}/$@.sh ${SED} $@.out 16cd65ed77Smillert diff ${.CURDIR}/$@.expected $@.out 17cd65ed77Smillert 182e665b55Sschwarzesubstitute: 192e665b55Sschwarze sh ${.CURDIR}/$@.sh 202e665b55Sschwarze 21cd65ed77Smillerthanoi: 22cd65ed77Smillert ${SED} -f ${.CURDIR}/$@.sed ${.CURDIR}/$@.in > $@.out 23cd65ed77Smillert diff ${.CURDIR}/$@.expected $@.out 24cd65ed77Smillert 25cd65ed77Smillertmath: 26cd65ed77Smillert ${SED} -f ${.CURDIR}/$@.sed ${.CURDIR}/$@.in > $@.out 27cd65ed77Smillert diff ${.CURDIR}/$@.expected $@.out 28cd65ed77Smillert 29cd65ed77Smillertsierpinski: 30cd65ed77Smillert ${SED} -nf ${.CURDIR}/$@.sed ${.CURDIR}/$@.in > $@.out 31cd65ed77Smillert diff ${.CURDIR}/$@.expected $@.out 3214274383Smillert 3345d46768Smillertnegation: 3445d46768Smillert echo foo | ${SED} "1!!s/foo/bar/" > $@.out 3545d46768Smillert diff ${.CURDIR}/$@.expected $@.out 3645d46768Smillert 37e47cfd50Sjasperinplace: 38e47cfd50Sjasper cp -f ${.CURDIR}/$@.in $@.txt 39e47cfd50Sjasper ${SED} -i -f ${.CURDIR}/sierpinski.sed $@.txt 40e47cfd50Sjasper diff ${.CURDIR}/sierpinski.expected $@.txt 41e47cfd50Sjasper 42e47cfd50Sjasperinplace2: 43e47cfd50Sjasper cp -f ${.CURDIR}/$@.in $@.txt 44e47cfd50Sjasper ${SED} -i 's/PROG/GROP/g' $@.txt 45e47cfd50Sjasper diff ${.CURDIR}/$@.expected $@.txt 46e47cfd50Sjasper 47e47cfd50Sjasperinplace3: 48e47cfd50Sjasper cp -f ${.CURDIR}/$@.in $@.txt 49e47cfd50Sjasper ${SED} -i 's/#PermitRootLogin no/PermitRootLogin yes/g' $@.txt 50e47cfd50Sjasper diff ${.CURDIR}/$@.expected $@.txt 51e47cfd50Sjasper 52f297b04dSottocommandl1: 53f297b04dSotto printf 'a\nbb\n' | ${SED} -f ${.CURDIR}/$@.sed > $@.out 54f297b04dSotto diff ${.CURDIR}/$@.expected $@.out 55f297b04dSotto 56f297b04dSottocommandl2: 57f297b04dSotto printf 'abc' | ${SED} -f ${.CURDIR}/$@.sed > $@.out 58f297b04dSotto diff ${.CURDIR}/$@.expected $@.out 59f297b04dSotto 60f297b04dSottocommandc1: 61f297b04dSotto printf 'abc' | ${SED} -f ${.CURDIR}/$@.sed > $@.out 62f297b04dSotto diff ${.CURDIR}/$@.expected $@.out 63f297b04dSotto 64f297b04dSottocommandD1: 65f297b04dSotto printf 'a\nbb\n' | ${SED} -f ${.CURDIR}/$@.sed > $@.out 66f297b04dSotto diff ${.CURDIR}/$@.expected $@.out 67f297b04dSotto 68*141b108eSmillertcommandD2: 69*141b108eSmillert printf 'a\nbb\n\n' | ${SED} -f ${.CURDIR}/$@.sed > $@.out 70*141b108eSmillert diff ${.CURDIR}/$@.expected $@.out 71*141b108eSmillert 72e47cfd50SjasperCLEANFILES+=*.out lines* script* *.txt 7314274383Smillert 7414274383Smillert.include <bsd.regress.mk> 75