]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
Testsuite coverage for AC_COPYRIGHT and AT_COPYRIGHT.
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Tue, 8 Jun 2010 04:51:39 +0000 (06:51 +0200)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Tue, 8 Jun 2010 04:51:39 +0000 (06:51 +0200)
* tests/autotest.at (AT@&t@_COPYRIGHT): New test.
* tests/base.at (AC@&t@_COPYRIGHT): Likewise.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
ChangeLog
tests/autotest.at
tests/base.at

index 79ce828defc3a8836f5acb828c2feb1101a7b62a..36632aec79fe50a77b522cf6cdc85bf18c802101 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2010-06-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
+       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.
 
index 72679156a94bdacacdebd86a7b00db63f4014d6c..a09e2c1e0219a0b29dc2fe89137ae1aec0b0cdaf 100644 (file)
@@ -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.  ##
 ## ------------------ ##
index c4b627348502a2679756a7a9698353b343cde9fd..042f16cd63e62d56ac34d7baadeb73de44ffad91 100644 (file)
@@ -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.  ##
 ## ---------------- ##