From 45d4676862c0a289aa39f15cca87ba4ac6bf91ce Mon Sep 17 00:00:00 2001 From: millert Date: Tue, 23 Jun 2015 22:53:14 +0000 Subject: [PATCH] Add regress test for multiple negation characters. --- regress/usr.bin/sed/Makefile | 8 ++++++-- regress/usr.bin/sed/negation.expected | 1 + 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 regress/usr.bin/sed/negation.expected diff --git a/regress/usr.bin/sed/Makefile b/regress/usr.bin/sed/Makefile index 826ef2c1a51..cf380d00faf 100644 --- a/regress/usr.bin/sed/Makefile +++ b/regress/usr.bin/sed/Makefile @@ -1,9 +1,9 @@ -# $OpenBSD: Makefile,v 1.3 2011/06/23 11:53:57 schwarze Exp $ +# $OpenBSD: Makefile,v 1.4 2015/06/23 22:53:14 millert Exp $ # $NetBSD: Makefile,v 1.1 2005/04/04 16:48:45 peter Exp $ SED= /usr/bin/sed -REGRESS_TARGETS= sedtest substitute hanoi math sierpinski +REGRESS_TARGETS= sedtest substitute hanoi math sierpinski negation sedtest: sh ${.CURDIR}/$@.sh ${SED} $@.out @@ -24,6 +24,10 @@ sierpinski: ${SED} -nf ${.CURDIR}/$@.sed ${.CURDIR}/$@.in > $@.out diff ${.CURDIR}/$@.expected $@.out +negation: + echo foo | ${SED} "1!!s/foo/bar/" > $@.out + diff ${.CURDIR}/$@.expected $@.out + CLEANFILES+=*.out lines* script* .include diff --git a/regress/usr.bin/sed/negation.expected b/regress/usr.bin/sed/negation.expected new file mode 100644 index 00000000000..257cc5642cb --- /dev/null +++ b/regress/usr.bin/sed/negation.expected @@ -0,0 +1 @@ +foo -- 2.20.1