diff options
author | Enji Cooper <ngie@FreeBSD.org> | 2014-10-01 04:07:17 +0000 |
---|---|---|
committer | Enji Cooper <ngie@FreeBSD.org> | 2014-10-01 04:07:17 +0000 |
commit | 478290db20b28ab28ce7e08cf33f1b44d82e4cb3 (patch) | |
tree | b31430c773d683d336caf956649e9ed3f459369c /usr.bin/m4 |
Notes
Diffstat (limited to 'usr.bin/m4')
-rw-r--r-- | usr.bin/m4/Makefile | 19 | ||||
-rw-r--r-- | usr.bin/m4/d_ff_after_dnl.m4.uue | 9 | ||||
-rw-r--r-- | usr.bin/m4/d_ff_after_dnl.out | 2 | ||||
-rw-r--r-- | usr.bin/m4/d_m4wrap-P.m4 | 5 | ||||
-rw-r--r-- | usr.bin/m4/d_m4wrap-P.out | 2 | ||||
-rw-r--r-- | usr.bin/m4/d_m4wrap.m4 | 5 | ||||
-rw-r--r-- | usr.bin/m4/d_m4wrap.out | 2 | ||||
-rwxr-xr-x | usr.bin/m4/t_m4.sh | 50 |
8 files changed, 94 insertions, 0 deletions
diff --git a/usr.bin/m4/Makefile b/usr.bin/m4/Makefile new file mode 100644 index 0000000000000..c78d0204f1d41 --- /dev/null +++ b/usr.bin/m4/Makefile @@ -0,0 +1,19 @@ +# $NetBSD: Makefile,v 1.1 2012/03/17 16:33:14 jruoho Exp $ + +NOMAN= # defined + +.include <bsd.own.mk> + +TESTSDIR= ${TESTSBASE}/usr.bin/m4 + +TESTS_SH= t_m4 + +FILESDIR= ${TESTSDIR} +FILES= d_ff_after_dnl.m4.uue +FILES+= d_ff_after_dnl.out +FILES+= d_m4wrap-P.m4 +FILES+= d_m4wrap-P.out +FILES+= d_m4wrap.m4 +FILES+= d_m4wrap.out + +.include <bsd.test.mk> diff --git a/usr.bin/m4/d_ff_after_dnl.m4.uue b/usr.bin/m4/d_ff_after_dnl.m4.uue new file mode 100644 index 0000000000000..8b900447dd7b2 --- /dev/null +++ b/usr.bin/m4/d_ff_after_dnl.m4.uue @@ -0,0 +1,9 @@ +$NetBSD: d_ff_after_dnl.m4.uue,v 1.1 2012/03/17 16:33:14 jruoho Exp $ + +begin 644 d_ff_after_dnl.m4 +M"0E42$E3(%-(3U5,1"!32$]7(%50("A,24Y%(#$I"F1N;`D)5$A)4R!32$]5 +M3$0@3D]4(%-(3U<@55`@*$Q)3D4@,BD*9&YL_PD)5$A)4R!32$]53$0@3D]4 +M(%-(3U<@55`@*$Q)3D4@,RD*9&YL"?\)5$A)4R!32$]53$0@3D]4(%-(3U<@ +K55`@*$Q)3D4@-"D*"0E42$E3(%-(3U5,1"!32$]7(%50("A,24Y%(#4I"E<@ +` +end diff --git a/usr.bin/m4/d_ff_after_dnl.out b/usr.bin/m4/d_ff_after_dnl.out new file mode 100644 index 0000000000000..8e51f1ea05c53 --- /dev/null +++ b/usr.bin/m4/d_ff_after_dnl.out @@ -0,0 +1,2 @@ + THIS SHOULD SHOW UP (LINE 1) + THIS SHOULD SHOW UP (LINE 5) diff --git a/usr.bin/m4/d_m4wrap-P.m4 b/usr.bin/m4/d_m4wrap-P.m4 new file mode 100644 index 0000000000000..e0298587f03bf --- /dev/null +++ b/usr.bin/m4/d_m4wrap-P.m4 @@ -0,0 +1,5 @@ +m4_dnl $NetBSD: d_m4wrap-P.m4,v 1.1 2012/03/17 16:33:14 jruoho Exp $ +m4_define(`ateof', `TEXT AT EOF +')m4_dnl +m4_m4wrap(`ateof()')m4_dnl +TEXT IN BODY diff --git a/usr.bin/m4/d_m4wrap-P.out b/usr.bin/m4/d_m4wrap-P.out new file mode 100644 index 0000000000000..a1bc22a097294 --- /dev/null +++ b/usr.bin/m4/d_m4wrap-P.out @@ -0,0 +1,2 @@ +TEXT IN BODY +TEXT AT EOF diff --git a/usr.bin/m4/d_m4wrap.m4 b/usr.bin/m4/d_m4wrap.m4 new file mode 100644 index 0000000000000..b74db961c3751 --- /dev/null +++ b/usr.bin/m4/d_m4wrap.m4 @@ -0,0 +1,5 @@ +dnl $NetBSD: d_m4wrap.m4,v 1.1 2012/03/17 16:33:14 jruoho Exp $ +define(`ateof', `TEXT AT EOF +')dnl +m4wrap(`ateof()')dnl +TEXT IN BODY diff --git a/usr.bin/m4/d_m4wrap.out b/usr.bin/m4/d_m4wrap.out new file mode 100644 index 0000000000000..a1bc22a097294 --- /dev/null +++ b/usr.bin/m4/d_m4wrap.out @@ -0,0 +1,2 @@ +TEXT IN BODY +TEXT AT EOF diff --git a/usr.bin/m4/t_m4.sh b/usr.bin/m4/t_m4.sh new file mode 100755 index 0000000000000..a0e1e7060f9ec --- /dev/null +++ b/usr.bin/m4/t_m4.sh @@ -0,0 +1,50 @@ +# $NetBSD: t_m4.sh,v 1.1 2012/03/17 16:33:14 jruoho Exp $ +# +# Copyright (c) 2008, 2009 The NetBSD Foundation, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + +atf_test_case eof +eof_head() +{ + atf_set "descr" "Checks that m4 doesn't confuse 0xFF with EOF" +} +eof_body() +{ + cp "$(atf_get_srcdir)/d_ff_after_dnl.m4.uue" . + uudecode d_ff_after_dnl.m4.uue + atf_check -o file:"$(atf_get_srcdir)/d_ff_after_dnl.out" \ + m4 d_ff_after_dnl.m4 + + atf_check -o file:"$(atf_get_srcdir)/d_m4wrap.out" \ + m4 "$(atf_get_srcdir)/d_m4wrap.m4" + + atf_check -o file:"$(atf_get_srcdir)/d_m4wrap-P.out" \ + m4 -P "$(atf_get_srcdir)/d_m4wrap-P.m4" +} + +atf_init_test_cases() +{ + atf_add_test_case eof +} |