summaryrefslogtreecommitdiff
path: root/regress/usr.bin
diff options
context:
space:
mode:
Diffstat (limited to 'regress/usr.bin')
-rw-r--r--regress/usr.bin/m4/Makefile9
-rw-r--r--regress/usr.bin/m4/fibo.m47
-rw-r--r--regress/usr.bin/m4/fibo.out1
3 files changed, 15 insertions, 2 deletions
diff --git a/regress/usr.bin/m4/Makefile b/regress/usr.bin/m4/Makefile
index 345c5ed3def..a3742b22cf4 100644
--- a/regress/usr.bin/m4/Makefile
+++ b/regress/usr.bin/m4/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.1 2000/07/01 00:31:01 espie Exp $
+# $OpenBSD: Makefile,v 1.2 2000/07/01 00:49:07 espie Exp $
# $NetBSD: Makefile,v 1.2 1999/02/13 02:54:33 lukem Exp $
NOMAN=
@@ -6,7 +6,7 @@ NOPROG=
CLEANFILES+= ff_after_dnl.m4
-regress: test-ff_after_dnl test-m4wrap
+regress: test-ff_after_dnl test-m4wrap test-fibo
test-ff_after_dnl: ff_after_dnl.m4
m4 ff_after_dnl.m4 | diff - ${.CURDIR}/ff_after_dnl.out
@@ -17,4 +17,9 @@ ff_after_dnl.m4: ff_after_dnl.m4.uu
test-m4wrap:
m4 ${.CURDIR}/m4wrap.m4 | diff - ${.CURDIR}/m4wrap.out
+test-fibo:
+ m4 ${.CURDIR}/fibo.m4 | diff - ${.CURDIR}/fibo.out
+
+.PHONY: test-ff_after_dnl test-m4wrap test-fibo
+
.include <bsd.prog.mk>
diff --git a/regress/usr.bin/m4/fibo.m4 b/regress/usr.bin/m4/fibo.m4
new file mode 100644
index 00000000000..36d719a251c
--- /dev/null
+++ b/regress/usr.bin/m4/fibo.m4
@@ -0,0 +1,7 @@
+dnl $OpenBSD: fibo.m4,v 1.1 2000/07/01 00:49:07 espie Exp $
+define(`copy', `$1')dnl
+define(`fibo',dnl
+`ifelse($1,0,`a',dnl
+$1,1,`b',dnl
+`copy(fibo(decr($1)))`'copy(fibo(decr(decr($1))))')')dnl
+fibo(13)
diff --git a/regress/usr.bin/m4/fibo.out b/regress/usr.bin/m4/fibo.out
new file mode 100644
index 00000000000..2c7ada13967
--- /dev/null
+++ b/regress/usr.bin/m4/fibo.out
@@ -0,0 +1 @@
+babbababbabbababbababbabbababbabbababbababbabbababbababbabbababbabbababbababbabbababbabbababbababbabbababbababbabbababbabbababbababbabbababbababbabbababbabbababbababbabbababbabbababbababbabbababbababbabbababbabbababbababbabbababbabbababbababbabbababbababbabbababbabbababbababbabbababbababbabbababbabbababbababbabbababbabbababbababbabbababbababbabbababbabbababbababbabbababbabab