From: anton Date: Mon, 18 Dec 2017 19:19:08 +0000 (+0000) Subject: Add tests for the environment related commands in csh. While here, print a X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=aeb91fd31b06f24d7541cf6534c0f39f3d812d3c;p=openbsd Add tests for the environment related commands in csh. While here, print a descriptive header before each test, inspired by the many others in regress. --- diff --git a/regress/bin/csh/Makefile b/regress/bin/csh/Makefile index 16bd73c9e75..b604773d7c7 100644 --- a/regress/bin/csh/Makefile +++ b/regress/bin/csh/Makefile @@ -1,9 +1,9 @@ -# $OpenBSD: Makefile,v 1.4 2017/11/16 19:05:44 anton Exp $ - -REGRESS_TARGETS= filec +# $OpenBSD: Makefile,v 1.5 2017/12/18 19:19:08 anton Exp $ CSH= /bin/csh +REGRESS_TARGETS= filec + PROG= edit CFLAGS+= -Wall LDADD+= -lutil @@ -13,6 +13,16 @@ edit.c: ${.CURDIR}/../ksh/edit/edit.c @cp ${.CURDIR}/../ksh/edit/edit.c . filec: edit + @echo '\n======== filec ========' sh ${.CURDIR}/filec.sh ${CSH} +REGRESS_TARGETS+= env + +.SUFFIXES: .in + +.in: + @echo '\n======== ${@} ========' + env -i MALLOC_OPTIONS=S ${CSH} <${.CURDIR}/${@}.in 2>&1 | \ + diff -u ${.CURDIR}/${@}.ok - + .include diff --git a/regress/bin/csh/env.in b/regress/bin/csh/env.in new file mode 100644 index 00000000000..e76d8149c60 --- /dev/null +++ b/regress/bin/csh/env.in @@ -0,0 +1,9 @@ +setenv FOO 1 +echo $FOO +unsetenv FOO +setenv | grep FOO || echo ok +setenv FOO 1 +setenv FOOFOO 2 +echo $FOO $FOOFOO +unsetenv FOO* +setenv | grep FOO || echo ok diff --git a/regress/bin/csh/env.ok b/regress/bin/csh/env.ok new file mode 100644 index 00000000000..15859e8edc5 --- /dev/null +++ b/regress/bin/csh/env.ok @@ -0,0 +1,4 @@ +1 +ok +1 2 +ok