summaryrefslogtreecommitdiff
path: root/regress/usr.bin
diff options
context:
space:
mode:
authorStuart Henderson <sthen@cvs.openbsd.org>2009-10-14 17:22:16 +0000
committerStuart Henderson <sthen@cvs.openbsd.org>2009-10-14 17:22:16 +0000
commita85c3fb95139b506560ccdada49e4885b28183f3 (patch)
treebb587355479dc3f0cd39467a9b09fc6448e78cbe /regress/usr.bin
parent5b12bc258fe8c9e40a38b5d45689be67d677bb9e (diff)
Add a test for the new -P option. ok espie@
Diffstat (limited to 'regress/usr.bin')
-rw-r--r--regress/usr.bin/m4/Makefile8
-rw-r--r--regress/usr.bin/m4/gnuprefix.m42
-rw-r--r--regress/usr.bin/m4/gnuprefix.out45
3 files changed, 53 insertions, 2 deletions
diff --git a/regress/usr.bin/m4/Makefile b/regress/usr.bin/m4/Makefile
index 6a0d5d64306..8c5ea31a2cb 100644
--- a/regress/usr.bin/m4/Makefile
+++ b/regress/usr.bin/m4/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.26 2009/06/26 08:44:07 espie Exp $
+# $OpenBSD: Makefile,v 1.27 2009/10/14 17:22:15 sthen Exp $
FIBOMAX=25
M4=m4
@@ -11,7 +11,7 @@ REGRESS_TARGETS= test-ff_after_dnl test-m4wrap test-m4wrap2 \
test-patterns trip test-strangequotes test-redef test-quotes \
test-weird test-args test-args2 test-esyscmd test-eval test-gnupatterns \
test-gnupatterns2 test-comments test-synch1 test-synch1bis \
- test-gnuformat test-includes test-dumpdef
+ test-gnuformat test-includes test-dumpdef test-gnuprefix
test-ff_after_dnl: ff_after_dnl.m4
${M4} ff_after_dnl.m4 | diff - ${.CURDIR}/ff_after_dnl.out
@@ -95,6 +95,10 @@ test-synch1bis:
test-dumpdef:
${M4} ${.CURDIR}/dumpdef.m4 2>/dev/null
+test-gnuprefix:
+ ${M4} -P ${.CURDIR}/gnuprefix.m4 2>&1 | \
+ diff -u - ${.CURDIR}/gnuprefix.out
+
.PHONY: ${REGRESS_TARGETS}
.include <bsd.regress.mk>
diff --git a/regress/usr.bin/m4/gnuprefix.m4 b/regress/usr.bin/m4/gnuprefix.m4
new file mode 100644
index 00000000000..fff9784ed2c
--- /dev/null
+++ b/regress/usr.bin/m4/gnuprefix.m4
@@ -0,0 +1,2 @@
+dumpdef()
+m4_dumpdef()
diff --git a/regress/usr.bin/m4/gnuprefix.out b/regress/usr.bin/m4/gnuprefix.out
new file mode 100644
index 00000000000..aff4c01d863
--- /dev/null
+++ b/regress/usr.bin/m4/gnuprefix.out
@@ -0,0 +1,45 @@
+`m4_ifelse' `m4_ifelse'
+`m4_dnl' `m4_dnl'
+`m4_expr' `m4_expr'
+`m4_builtin' `m4_builtin'
+`m4_popdef' `m4_popdef'
+`m4_eval' `m4_eval'
+`m4_len' `m4_len'
+`m4_indir' `m4_indir'
+`m4_sinclude' `m4_sinclude'
+`m4_index' `m4_index'
+`m4_traceoff' `m4_traceoff'
+`m4___file__' `m4___file__'
+`m4_unix' `m4_unix'
+`m4_changecom' `m4_changecom'
+`m4_defn' `m4_defn'
+`m4_decr' `m4_decr'
+`m4_translit' `m4_translit'
+`m4_patsubst' `m4_patsubst'
+`m4_dumpdef' `m4_dumpdef'
+`m4___line__' `m4___line__'
+`m4_esyscmd' `m4_esyscmd'
+`m4_traceon' `m4_traceon'
+`m4_incr' `m4_incr'
+`m4_shift' `m4_shift'
+`m4_syscmd' `m4_syscmd'
+`m4_include' `m4_include'
+`m4_pushdef' `m4_pushdef'
+`m4_paste' `m4_paste'
+`m4_regexp' `m4_regexp'
+`m4_changequote' `m4_changequote'
+`m4_undivert' `m4_undivert'
+`m4_m4exit' `m4_m4exit'
+`m4_substr' `m4_substr'
+`m4_m4wrap' `m4_m4wrap'
+`m4_ifdef' `m4_ifdef'
+`m4_sysval' `m4_sysval'
+`m4_divert' `m4_divert'
+`m4_maketemp' `m4_maketemp'
+`m4_spaste' `m4_spaste'
+`m4_define' `m4_define'
+`m4_undefine' `m4_undefine'
+`m4_divnum' `m4_divnum'
+`m4_errprint' `m4_errprint'
+dumpdef()
+