diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2001-09-29 15:49:19 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2001-09-29 15:49:19 +0000 |
commit | 8bc58c043141e169968250361a1da43296f9dec4 (patch) | |
tree | ab7100a35742e1af3fb10e701f5fe37e624a6f06 | |
parent | 1216dfdc405b9cce8718176ff06e5124d152f3d3 (diff) |
test funky quotes, in normal and gnu-m4 mode.
-rw-r--r-- | regress/usr.bin/m4/Makefile | 10 | ||||
-rw-r--r-- | regress/usr.bin/m4/quotes.gnu.out | 9 | ||||
-rw-r--r-- | regress/usr.bin/m4/quotes.m4 | 21 | ||||
-rw-r--r-- | regress/usr.bin/m4/quotes.out | 9 |
4 files changed, 47 insertions, 2 deletions
diff --git a/regress/usr.bin/m4/Makefile b/regress/usr.bin/m4/Makefile index 2cfa2e40530..54fa9dcee0a 100644 --- a/regress/usr.bin/m4/Makefile +++ b/regress/usr.bin/m4/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.9 2001/09/19 19:15:08 espie Exp $ +# $OpenBSD: Makefile,v 1.10 2001/09/29 15:49:18 espie Exp $ # $NetBSD: Makefile,v 1.2 1999/02/13 02:54:33 lukem Exp $ NOMAN= @@ -11,7 +11,7 @@ M4=m4 CLEANFILES+= ff_after_dnl.m4 strangequotes.m4 fibo.out ALL_TESTS= test-ff_after_dnl test-m4wrap test-fibo test-patterns trip \ - test-strangequotes test-redef + test-strangequotes test-redef test-quotes regress: ${ALL_TESTS} @@ -36,6 +36,12 @@ test-fibo: fibo.out trip: echo "undefine(\`errprint')"|MALLOC_OPTIONS=A ${M4} -Derrprint=a >/dev/null +test-quotes: + ${M4} ${.CURDIR}/quotes.m4 2>&1| \ + sed -e 's,\( *\).*/quotes.m4,\1quotes.m4,' | \ + diff - ${.CURDIR}/quotes.out + ${M4} -g ${.CURDIR}/quotes.m4 2>&1|diff - ${.CURDIR}/quotes.gnu.out + test-strangequotes: strangequotes.m4 ${M4} strangequotes.m4| diff - ${.CURDIR}/strangequotes.out diff --git a/regress/usr.bin/m4/quotes.gnu.out b/regress/usr.bin/m4/quotes.gnu.out new file mode 100644 index 00000000000..db9585348f2 --- /dev/null +++ b/regress/usr.bin/m4/quotes.gnu.out @@ -0,0 +1,9 @@ +`No quotes left' +Quotes +No quotes left +`No quotes left' +# this is a comment +# this is a COMMENT + +# this is a COMMENT +# this is a comment diff --git a/regress/usr.bin/m4/quotes.m4 b/regress/usr.bin/m4/quotes.m4 new file mode 100644 index 00000000000..08414663974 --- /dev/null +++ b/regress/usr.bin/m4/quotes.m4 @@ -0,0 +1,21 @@ +dnl $OpenBSD: quotes.m4,v 1.1 2001/09/29 15:49:18 espie Exp $ +dnl Checking the way changequote() is supposed to work +dnl in both normal and gnu emulation mode +changequote()dnl +`No quotes left' +changequote([,])dnl +[Quotes]changequote +`No quotes left' +changequote([,])dnl +changequote(,)dnl +`No quotes left' +changequote([,])dnl +dnl same thing with comments, so first: +define([comment], [COMMENT])dnl +# this is a comment +changecom(>>)dnl +# this is a comment +changecom +# this is a comment +changecom(,)dnl +# this is a comment diff --git a/regress/usr.bin/m4/quotes.out b/regress/usr.bin/m4/quotes.out new file mode 100644 index 00000000000..555590d2a2b --- /dev/null +++ b/regress/usr.bin/m4/quotes.out @@ -0,0 +1,9 @@ +No quotes left +Quotes +No quotes left +No quotes left' +changequote([,)# this is a comment +# this is a comment + +# this is a comment +# this is a comment |