From: Ralf Wildenhues Date: Tue, 8 Jun 2010 04:51:39 +0000 (+0200) Subject: Testsuite coverage for AC_COPYRIGHT and AT_COPYRIGHT. X-Git-Tag: v2.66~42 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9c975f4d23f512e571b5bea7472120e89ba1f1f2;p=thirdparty%2Fautoconf.git Testsuite coverage for AC_COPYRIGHT and AT_COPYRIGHT. * tests/autotest.at (AT@&t@_COPYRIGHT): New test. * tests/base.at (AC@&t@_COPYRIGHT): Likewise. Signed-off-by: Ralf Wildenhues --- diff --git a/ChangeLog b/ChangeLog index 79ce828d..36632aec 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2010-06-08 Ralf Wildenhues + Testsuite coverage for AC_COPYRIGHT and AT_COPYRIGHT. + * tests/autotest.at (AT@&t@_COPYRIGHT): New test. + * tests/base.at (AC@&t@_COPYRIGHT): Likewise. + Testsuite coverage for __file__ and __line__. * tests/m4sugar.at (__file__ and __line__): New test. diff --git a/tests/autotest.at b/tests/autotest.at index 72679156..a09e2c1e 100644 --- a/tests/autotest.at +++ b/tests/autotest.at @@ -135,6 +135,30 @@ m4_define([AT_CHECK_EGREP], ]) +## -------------- ## +## AT_COPYRIGHT. ## +## -------------- ## + +# Ensure the FSF notice as well as the user-provided one are present +# in the head of the testsuite as well as the --version output. + +AT_CHECK_AT([AT@&t@_COPYRIGHT], +[[AT_INIT([Testing AT@&t@_COPYRIGHT]) +AT_COPYRIGHT([[This is just a test notice, not a real one, so let's avoid +words that may be matched by scanners for legal things, +causing extra work for distributors. +Multi-line values should be supported. +]]) +]], [], [], [stdout], [], [], [ +AT_CHECK([grep 'Copyright.*Free Software Foundation' stdout], [], [ignore]) +AT_CHECK([grep 'This is just a test notice' stdout], [], [ignore]) +AT_CHECK([sed 50q micro-suite | grep 'Copyright.*Free Software Foundation'], + [], [ignore]) +AT_CHECK([sed 50q micro-suite | grep 'This is just a test notice'], + [], [ignore])], +[--version]) + + ## ------------------ ## ## Empty test suite. ## ## ------------------ ## diff --git a/tests/base.at b/tests/base.at index c4b62734..042f16cd 100644 --- a/tests/base.at +++ b/tests/base.at @@ -219,6 +219,37 @@ AT_CHECK([grep "^PACKAGE_TARNAME='fu'\$" configure], [], [ignore]) AT_CLEANUP +## -------------- ## +## AC_COPYRIGHT. ## +## -------------- ## + +# Ensure the FSF notice as well as the user-provided one are present +# in the head of the testsuite as well as the --version output. + +AT_SETUP([AC@&t@_COPYRIGHT]) + +AT_DATA([configure.ac], +[[AC_INIT([GNU fu], [1.0]) +AC_COPYRIGHT([[This is just a test notice, not a real one, so let's avoid +words that may be matched by scanners for legal things, +causing extra work for distributors. +Multi-line values should be supported. +]]) +]]) + +AT_CHECK_AUTOCONF +AT_CHECK_CONFIGURE([--version], [], [stdout]) +AT_CHECK([grep 'Copyright.*Free Software Foundation' stdout], [], [ignore]) +AT_CHECK([grep 'This is just a test notice' stdout], [], [ignore]) +AT_CHECK([sed -ne 50q -e '/Copyright/{' -e N -e N -e N -e N -e 's/#//g' ]dnl + [ -e 's/\n//g' -e p -e '}' configure ]dnl + [ | grep 'Copyright.*Free Software Foundation'], + [], [ignore]) +AT_CHECK([sed 50q configure | grep 'This is just a test notice'], [], [ignore]) + +AT_CLEANUP + + ## ---------------- ## ## AC_CACHE_CHECK. ## ## ---------------- ##