summaryrefslogtreecommitdiff
path: root/regress/usr.bin
diff options
context:
space:
mode:
Diffstat (limited to 'regress/usr.bin')
-rw-r--r--regress/usr.bin/m4/Makefile14
-rw-r--r--regress/usr.bin/m4/redef.m413
-rw-r--r--regress/usr.bin/m4/redef.out1
-rw-r--r--regress/usr.bin/m4/strangequotes.m4.uu2
4 files changed, 25 insertions, 5 deletions
diff --git a/regress/usr.bin/m4/Makefile b/regress/usr.bin/m4/Makefile
index 739c9a07a2d..2cfa2e40530 100644
--- a/regress/usr.bin/m4/Makefile
+++ b/regress/usr.bin/m4/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.8 2001/09/17 15:46:02 espie Exp $
+# $OpenBSD: Makefile,v 1.9 2001/09/19 19:15:08 espie Exp $
# $NetBSD: Makefile,v 1.2 1999/02/13 02:54:33 lukem Exp $
NOMAN=
@@ -10,8 +10,10 @@ M4=m4
.SUFFIXES: .m4 .m4.uu
CLEANFILES+= ff_after_dnl.m4 strangequotes.m4 fibo.out
-regress: test-ff_after_dnl test-m4wrap test-fibo test-patterns trip \
- test-strangequotes
+ALL_TESTS= test-ff_after_dnl test-m4wrap test-fibo test-patterns trip \
+ test-strangequotes test-redef
+
+regress: ${ALL_TESTS}
test-ff_after_dnl: ff_after_dnl.m4
${M4} ff_after_dnl.m4 | diff - ${.CURDIR}/ff_after_dnl.out
@@ -37,7 +39,9 @@ trip:
test-strangequotes: strangequotes.m4
${M4} strangequotes.m4| diff - ${.CURDIR}/strangequotes.out
-.PHONY: test-ff_after_dnl test-m4wrap test-patterns test-fibo trip \
- test-strangequotes
+test-redef:
+ ${M4} ${.CURDIR}/redef.m4 | diff - ${.CURDIR}/redef.out
+
+.PHONY: ${ALL_TESTS}
.include <bsd.prog.mk>
diff --git a/regress/usr.bin/m4/redef.m4 b/regress/usr.bin/m4/redef.m4
new file mode 100644
index 00000000000..ffc254a5b1b
--- /dev/null
+++ b/regress/usr.bin/m4/redef.m4
@@ -0,0 +1,13 @@
+dnl $OpenBSD: redef.m4,v 1.1 2001/09/19 19:15:08 espie Exp $
+define(`mydefine',defn(`define'))dnl
+mydefine(`mydefn',defn(`defn'))dnl
+mydefine(`myundefine',mydefn(`undefine'))dnl
+myundefine(`defn')dnl
+myundefine(`define')dnl
+myundefine(`undefine')dnl
+mydefine(`mydef2',mydefn(`mydefine'))dnl
+mydefine(`mydef', mydefn(`define'))dnl
+myundefine(`mydefine')dnl
+mydef2(`A',`B')dnl
+mydef(`C',`D')dnl
+A C
diff --git a/regress/usr.bin/m4/redef.out b/regress/usr.bin/m4/redef.out
new file mode 100644
index 00000000000..a12ea8a775d
--- /dev/null
+++ b/regress/usr.bin/m4/redef.out
@@ -0,0 +1 @@
+B C
diff --git a/regress/usr.bin/m4/strangequotes.m4.uu b/regress/usr.bin/m4/strangequotes.m4.uu
index 83fd74497b9..a1c56a3e64c 100644
--- a/regress/usr.bin/m4/strangequotes.m4.uu
+++ b/regress/usr.bin/m4/strangequotes.m4.uu
@@ -1,3 +1,5 @@
+$OpenBSD: strangequotes.m4.uu,v 1.2 2001/09/19 19:15:08 espie Exp $
+
begin 644 strangequotes.m4
M8VAA;F=E<75O=&4HJRR[*61N;`ID969I;F4HJT&[+""K)#$@=&\@)#*[*61N
*;`I!*#0L(#4I"F4H