From: otto Date: Mon, 12 Jun 2017 16:58:31 +0000 (+0000) Subject: Add some tests from kshe48@zoho.com. Currently failing, but will be fixed soon. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=f297b04d6bb068946f33857018326af6f2b7822c;p=openbsd Add some tests from kshe48@zoho.com. Currently failing, but will be fixed soon. --- diff --git a/regress/usr.bin/sed/Makefile b/regress/usr.bin/sed/Makefile index 57730250a75..074adff9a8b 100644 --- a/regress/usr.bin/sed/Makefile +++ b/regress/usr.bin/sed/Makefile @@ -1,10 +1,10 @@ -# $OpenBSD: Makefile,v 1.5 2015/07/17 20:42:03 jasper Exp $ +# $OpenBSD: Makefile,v 1.6 2017/06/12 16:58:31 otto 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 negation \ - inplace inplace2 inplace3 + inplace inplace2 inplace3 commandl1 commandl2 commandc1 commandD1 sedtest: sh ${.CURDIR}/$@.sh ${SED} $@.out @@ -44,6 +44,23 @@ inplace3: ${SED} -i 's/#PermitRootLogin no/PermitRootLogin yes/g' $@.txt diff ${.CURDIR}/$@.expected $@.txt +commandl1: + printf 'a\nbb\n' | ${SED} -f ${.CURDIR}/$@.sed > $@.out + diff ${.CURDIR}/$@.expected $@.out + +commandl2: + printf 'abc' | ${SED} -f ${.CURDIR}/$@.sed > $@.out + diff ${.CURDIR}/$@.expected $@.out + +commandc1: + printf 'abc' | ${SED} -f ${.CURDIR}/$@.sed > $@.out + diff ${.CURDIR}/$@.expected $@.out + +commandD1: + printf 'a\nbb\n' | ${SED} -f ${.CURDIR}/$@.sed > $@.out + diff ${.CURDIR}/$@.expected $@.out + + CLEANFILES+=*.out lines* script* *.txt .include diff --git a/regress/usr.bin/sed/commandD1.expected b/regress/usr.bin/sed/commandD1.expected new file mode 100644 index 00000000000..b6a9a9080c8 --- /dev/null +++ b/regress/usr.bin/sed/commandD1.expected @@ -0,0 +1 @@ +bbx diff --git a/regress/usr.bin/sed/commandD1.sed b/regress/usr.bin/sed/commandD1.sed new file mode 100644 index 00000000000..a07c6c867a1 --- /dev/null +++ b/regress/usr.bin/sed/commandD1.sed @@ -0,0 +1 @@ +${s/.$/&x/;q;};N;D diff --git a/regress/usr.bin/sed/commandc1.expected b/regress/usr.bin/sed/commandc1.expected new file mode 100644 index 00000000000..8e27be7d615 --- /dev/null +++ b/regress/usr.bin/sed/commandc1.expected @@ -0,0 +1 @@ +text diff --git a/regress/usr.bin/sed/commandc1.sed b/regress/usr.bin/sed/commandc1.sed new file mode 100644 index 00000000000..fb512bc283a --- /dev/null +++ b/regress/usr.bin/sed/commandc1.sed @@ -0,0 +1,3 @@ +c\ +text +s/.*// diff --git a/regress/usr.bin/sed/commandl1.expected b/regress/usr.bin/sed/commandl1.expected new file mode 100644 index 00000000000..1945aac9969 --- /dev/null +++ b/regress/usr.bin/sed/commandl1.expected @@ -0,0 +1,2 @@ +bb$ +bb diff --git a/regress/usr.bin/sed/commandl1.sed b/regress/usr.bin/sed/commandl1.sed new file mode 100644 index 00000000000..091d5f48a6a --- /dev/null +++ b/regress/usr.bin/sed/commandl1.sed @@ -0,0 +1 @@ +${l;q;};N;D diff --git a/regress/usr.bin/sed/commandl2.expected b/regress/usr.bin/sed/commandl2.expected new file mode 100644 index 00000000000..4fbdeab3d18 --- /dev/null +++ b/regress/usr.bin/sed/commandl2.expected @@ -0,0 +1,2 @@ +text +$ diff --git a/regress/usr.bin/sed/commandl2.sed b/regress/usr.bin/sed/commandl2.sed new file mode 100644 index 00000000000..6d2b266577e --- /dev/null +++ b/regress/usr.bin/sed/commandl2.sed @@ -0,0 +1,3 @@ +c\ +text +l