diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2000-07-01 00:49:09 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2000-07-01 00:49:09 +0000 |
commit | deaa8feaff48aad6c5c14dfefa784f5990326b6c (patch) | |
tree | ebb9278506afee129b2296524bec64ba25ba721c /regress | |
parent | 7ae9d7b42b7178d345ce0fb3ae6510b857038825 (diff) |
Add vicious Fibonacci test.
Our m4 runs against a hard limit pretty soon currently,
but this will be fixed.
Diffstat (limited to 'regress')
-rw-r--r-- | regress/usr.bin/m4/Makefile | 9 | ||||
-rw-r--r-- | regress/usr.bin/m4/fibo.m4 | 7 | ||||
-rw-r--r-- | regress/usr.bin/m4/fibo.out | 1 |
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 |