From 9974fc21eb60f211887c7a86e03c6ffab5e8727b Mon Sep 17 00:00:00 2001 From: Ralf Wildenhues Date: Sat, 14 Nov 2009 21:56:15 +0100 Subject: [PATCH] Coverage: diagnose variables with forbidden dist_ prefix. * tests/candist.test: New test. * tests/Makefile.am: Update. Signed-off-by: Ralf Wildenhues --- ChangeLog | 4 ++++ tests/Makefile.am | 1 + tests/Makefile.in | 1 + tests/candist.test | 34 ++++++++++++++++++++++++++++++++++ 4 files changed, 40 insertions(+) create mode 100755 tests/candist.test diff --git a/ChangeLog b/ChangeLog index 9b514838b..8f0a2dd40 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2009-11-14 Ralf Wildenhues + Coverage: diagnose variables with forbidden dist_ prefix. + * tests/candist.test: New test. + * tests/Makefile.am: Update. + Coverage for conditional `else' and `endif' arguments. * tests/cond46.test: New test. * tests/Makefile.am: Update. diff --git a/tests/Makefile.am b/tests/Makefile.am index 6d42996cf..fe16314a2 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -95,6 +95,7 @@ badline.test \ badprog.test \ block.test \ bsource.test \ +candist.test \ canon.test \ canon2.test \ canon3.test \ diff --git a/tests/Makefile.in b/tests/Makefile.in index 7ac0b620e..be3f2a703 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -329,6 +329,7 @@ badline.test \ badprog.test \ block.test \ bsource.test \ +candist.test \ canon.test \ canon2.test \ canon3.test \ diff --git a/tests/candist.test b/tests/candist.test new file mode 100755 index 000000000..0a859dd90 --- /dev/null +++ b/tests/candist.test @@ -0,0 +1,34 @@ +#! /bin/sh +# Copyright (C) 2009 Free Software Foundation, Inc. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# Test to make sure things that cannot be dist_'ed are diagnosed. + +. ./defs || Exit 1 + +set -e + +echo AC_OUTPUT >>configure.in + +cat > Makefile.am << 'END' +dist_bin_PROGRAMS = foo +dist_lib_LIBRARIES = libfoo.a +END + +$ACLOCAL +AUTOMAKE_fails +test 2 -eq `grep -c 'dist.*forbidden' stderr` + +Exit 0 -- 2.47.2