diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2019-01-29 20:10:27 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2019-01-29 20:10:27 +0000 |
commit | 77421e55c092a83c5c8d40f66595ecb5b87a4867 (patch) | |
tree | 5435d0608c2ae77f001d38c3d09235419a1bb367 | |
parent | efb37e7a5764baf8201f10e19e71303463e8d896 (diff) |
Tests to verify that the special case for Friday is not applied when
the -A and -B options are used. From Andy Bradford.
-rw-r--r-- | regress/usr.bin/calendar/Makefile | 14 | ||||
-rw-r--r-- | regress/usr.bin/calendar/after.out | 6 | ||||
-rw-r--r-- | regress/usr.bin/calendar/before.out | 6 | ||||
-rw-r--r-- | regress/usr.bin/calendar/beforeafter.in | 7 |
4 files changed, 31 insertions, 2 deletions
diff --git a/regress/usr.bin/calendar/Makefile b/regress/usr.bin/calendar/Makefile index b4d8bfc9c50..1d1a1c06e32 100644 --- a/regress/usr.bin/calendar/Makefile +++ b/regress/usr.bin/calendar/Makefile @@ -1,6 +1,6 @@ -# $OpenBSD: Makefile,v 1.2 2016/09/14 16:11:54 tb Exp $ +# $OpenBSD: Makefile,v 1.3 2019/01/29 20:10:26 millert Exp $ -FILES?!= ls ${.CURDIR}/*.out +FILES?!= ls ${.CURDIR}/[0-9]*.out CALENDAR?= calendar IN= ${.CURDIR}/in @@ -15,6 +15,16 @@ ${f:C|.*/||}: @${CALENDAR} -f ${IN} -t ${f:C|.*/||:C/\..*//} | diff -u ${OUT} - .endfor +REGRESS_TARGETS+=before after + +before: + @echo ${*} + @${CALENDAR} -f ${.CURDIR}/beforeafter.in -t 20190109 -B 5 | diff -U 7 ${.CURDIR}/before.out - + +after: + @echo ${*} + @${CALENDAR} -f ${.CURDIR}/beforeafter.in -t 20190111 -A 5 | diff -U 7 ${.CURDIR}/after.out - + .PHONY: ${REGRESS_TARGETS} .include <bsd.regress.mk> diff --git a/regress/usr.bin/calendar/after.out b/regress/usr.bin/calendar/after.out new file mode 100644 index 00000000000..7b1d26c27e4 --- /dev/null +++ b/regress/usr.bin/calendar/after.out @@ -0,0 +1,6 @@ +Jan 11* Friday +Jan 12* Saturday +Jan 13* Sunday +Jan 14* Monday +Jan 15* Tuesday +Jan 16* Wednesday diff --git a/regress/usr.bin/calendar/before.out b/regress/usr.bin/calendar/before.out new file mode 100644 index 00000000000..1be24dca7e9 --- /dev/null +++ b/regress/usr.bin/calendar/before.out @@ -0,0 +1,6 @@ +Jan 04* Friday +Jan 05* Saturday +Jan 06* Sunday +Jan 07* Monday +Jan 08* Tuesday +Jan 09* Wednesday diff --git a/regress/usr.bin/calendar/beforeafter.in b/regress/usr.bin/calendar/beforeafter.in new file mode 100644 index 00000000000..ebd10b96f3c --- /dev/null +++ b/regress/usr.bin/calendar/beforeafter.in @@ -0,0 +1,7 @@ +Sunday Sunday +Monday Monday +Tuesday Tuesday +Wednesday Wednesday +Thursday Thursday +Friday Friday +Saturday Saturday |