diff options
author | Brian Callahan <bcallah@cvs.openbsd.org> | 2017-06-15 13:48:43 +0000 |
---|---|---|
committer | Brian Callahan <bcallah@cvs.openbsd.org> | 2017-06-15 13:48:43 +0000 |
commit | 091eeacaac7ad3be6504703535fa542aceb49f51 (patch) | |
tree | e66e1c29fa13f8ed26dfe45864c5d59f5c001ec6 /regress/usr.bin | |
parent | ec91d0dcf7aee9849fae3c7da637679ff1069753 (diff) |
Add -E flag (make warnings fatal), following the behavior of GNU m4 1.4.9+
Help and direction millert@ espie@ anton@ deraadt@
ok espie@
Diffstat (limited to 'regress/usr.bin')
-rw-r--r-- | regress/usr.bin/m4/Makefile | 10 | ||||
-rw-r--r-- | regress/usr.bin/m4/fatalwarnings.m4 | 3 | ||||
-rw-r--r-- | regress/usr.bin/m4/fatalwarnings.out | 1 |
3 files changed, 12 insertions, 2 deletions
diff --git a/regress/usr.bin/m4/Makefile b/regress/usr.bin/m4/Makefile index 04845d90411..08143728057 100644 --- a/regress/usr.bin/m4/Makefile +++ b/regress/usr.bin/m4/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.32 2016/11/01 00:35:34 tb Exp $ +# $OpenBSD: Makefile,v 1.33 2017/06/15 13:48:42 bcallah Exp $ FIBOMAX=25 M4=m4 @@ -13,7 +13,7 @@ REGRESS_TARGETS= test-ff_after_dnl test-m4wrap test-m4wrap2 \ test-gnupatterns2 test-comments test-synch1 test-synch1bis \ test-gnuformat test-includes test-dumpdef test-gnuprefix \ test-translit test-translit2 test-gnutranslit2 \ - test-gnueval test-gnusofterror + test-gnueval test-gnusofterror test-fatalwarnings test-fatalwarnings2 test-ff_after_dnl: ff_after_dnl.m4 ${M4} ff_after_dnl.m4 | diff - ${.CURDIR}/ff_after_dnl.out @@ -120,6 +120,12 @@ test-gnusofterror: ${M4} -g ${.CURDIR}/gnusofterror.m4 2>/dev/null| diff -u - ${.CURDIR}/gnusofterror.out ! ${M4} -g ${.CURDIR}/gnusofterror.m4 2>/dev/null >/dev/null +test-fatalwarnings: + if ${M4} -E -g ${.CURDIR}/fatalwarnings.m4 >/dev/null 2>&1 || test $$? -ne 1; then false; fi + +test-fatalwarnings2: + ${M4} -E -E -g ${.CURDIR}/fatalwarnings.m4 2>&1 | diff -u - ${.CURDIR}/fatalwarnings.out + .PHONY: ${REGRESS_TARGETS} .include <bsd.regress.mk> diff --git a/regress/usr.bin/m4/fatalwarnings.m4 b/regress/usr.bin/m4/fatalwarnings.m4 new file mode 100644 index 00000000000..66e007d9cec --- /dev/null +++ b/regress/usr.bin/m4/fatalwarnings.m4 @@ -0,0 +1,3 @@ +patsubst(`a') +patsubst(`b') +patsubst(`c') diff --git a/regress/usr.bin/m4/fatalwarnings.out b/regress/usr.bin/m4/fatalwarnings.out new file mode 100644 index 00000000000..a039270f21d --- /dev/null +++ b/regress/usr.bin/m4/fatalwarnings.out @@ -0,0 +1 @@ +m4: Too few arguments to patsubst |