summaryrefslogtreecommitdiff
path: root/regress
diff options
context:
space:
mode:
Diffstat (limited to 'regress')
-rw-r--r--regress/usr.bin/m4/Makefile10
-rw-r--r--regress/usr.bin/m4/fatalwarnings.m43
-rw-r--r--regress/usr.bin/m4/fatalwarnings.out1
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