]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* tests/autoscan.at (autoscan): New file.
authorNoah Misch <noah@cs.caltech.edu>
Mon, 15 Aug 2005 23:47:57 +0000 (23:47 +0000)
committerNoah Misch <noah@cs.caltech.edu>
Mon, 15 Aug 2005 23:47:57 +0000 (23:47 +0000)
* tests/suite.at: Use it.
* tests/Makefile.am (TESTSUITE_HAND_AT): Add it.
Reported against Libtool by Gideon Go <gideon.go@gmail.com>.

* tests/autotest.at (Keywords): Test keywords combinations.

ChangeLog
tests/Makefile.am
tests/Makefile.in
tests/autoscan.at [new file with mode: 0644]
tests/autotest.at
tests/suite.at

index ad58c9c6eb8fb5ab921bbffb6790d6ac2d894122..90721d2e8344c8d3ae4074163c00c35eba92f1dd 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2005-08-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       * tests/autoscan.at (autoscan): New file.
+       * tests/suite.at: Use it.
+       * tests/Makefile.am (TESTSUITE_HAND_AT): Add it.
+       Reported against Libtool by Gideon Go <gideon.go@gmail.com>.
+
+       * tests/autotest.at (Keywords): Test keywords combinations.
+
 2005-08-12  Stepan Kasal  <kasal@ucw.cz>
 
        * Makefile.maint (GZIP_ENV): When checking the help text of gzip,
index 6d2c3b2f1a5284a6bfe84a9325b6f502bedc408e..30d5175b508aee90e5dfd5dd934b5e10d902b7d3 100644 (file)
@@ -91,6 +91,7 @@ TESTSUITE_HAND_AT = \
        base.at tools.at torture.at \
        compile.at c.at fortran.at \
        semantics.at \
+       autoscan.at \
        foreign.at
 
 TESTSUITE_AT = $(TESTSUITE_GENERATED_AT) $(TESTSUITE_HAND_AT)
index 610577b7df7244ecd9d9cf53b74d5d950a5df2cf..3f8c4dc6d5f258d253ebab45b44ef5a6ccda1a7f 100644 (file)
@@ -219,6 +219,7 @@ TESTSUITE_HAND_AT = \
        base.at tools.at torture.at \
        compile.at c.at fortran.at \
        semantics.at \
+       autoscan.at \
        foreign.at
 
 TESTSUITE_AT = $(TESTSUITE_GENERATED_AT) $(TESTSUITE_HAND_AT)
diff --git a/tests/autoscan.at b/tests/autoscan.at
new file mode 100644 (file)
index 0000000..157323d
--- /dev/null
@@ -0,0 +1,50 @@
+#                                                      -*- Autotest -*-
+
+AT_BANNER([Autoscan.])
+
+# Copyright (C) 2005 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 2, 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, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+AT_SETUP([autoscan])
+AT_XFAIL_IF(:)
+
+AT_DATA([Makefile.am],
+[[SUBDIRS = subpkg
+]])
+
+AT_DATA([configure.ac],
+[[AC_INIT
+AC_PREREQ(2.59)
+AM_INIT_AUTOMAKE(foreign)
+AC_CONFIG_SUBDIRS(subpkg)
+AC_CONFIG_FILES(Makefile)
+AC_OUTPUT
+]])
+
+mkdir subpkg
+
+AT_DATA([subpkg/Makefile.am], [])
+AT_DATA([subpkg/configure.ac],
+[[AC_INIT
+AM_INIT_AUTOMAKE(foreign)
+AC_CONFIG_FILES(Makefile)
+AC_OUTPUT
+]])
+AT_CHECK([autoscan])
+AT_CHECK([grep subpkg/Makefile configure.scan], [1], [], [ignore])
+
+AT_CLEANUP
index 0776444fc6fa29e087c7718c47f259eac8ae5aaf..b0f0735158287a8ba02758097049b0094d91d58b 100644 (file)
@@ -241,3 +241,53 @@ AT_CHECK_AT_TITLE_CHAR([Backquote],    [`], [:])
 AT_CHECK_AT_TITLE_CHAR([Single-quote], ['], [:])
 AT_CHECK_AT_TITLE_CHAR([Double-quote], ["], [:])
 AT_CHECK_AT_TITLE_CHAR([Backslash],    [\])
+
+
+## --------- ##
+## Keywords. ##
+## --------- ##
+AT_SETUP([Keywords])
+AT_KEYWORDS([autotest])
+AT_XFAIL_IF(:)
+
+AT_DATA([k.at],
+[[m4_define([AT_PACKAGE_STRING],[k])
+m4_define([AT_PACKAGE_BUGREPORT],[devnull])
+AT_INIT
+AT_SETUP(none)
+AT_CHECK(:)
+AT_CLEANUP
+AT_SETUP(first)
+AT_KEYWORDS(key1)
+AT_CHECK(:)
+AT_CLEANUP
+AT_SETUP(second)
+AT_KEYWORDS(key2)
+AT_CHECK(:)
+AT_CLEANUP
+AT_SETUP(both)
+AT_KEYWORDS(key1)
+AT_KEYWORDS(key2)
+AT_CHECK(:)
+AT_CLEANUP
+]])
+AT_CHECK_AUTOM4TE([--language=autotest -o k k.at])
+
+# AT_CHECK_EGREP(PATTERN, STATUS, COUNT)
+m4_define([AT_CHECK_EGREP],
+[AT_CHECK([$EGREP -c '$1' stdout], $2, [$3
+], ignore)
+])
+
+# AT_CHECK_KEYS(TESTSUITE-OPTIONS, PATTERN1, COUNT1, PATTERN2, COUNT2)
+m4_define([AT_CHECK_KEYS],
+[AT_CHECK([./k $1], 0, [stdout])
+AT_CHECK_EGREP([$2], 0, [$3])
+AT_CHECK_EGREP([$4], 1, [$5])
+])
+
+AT_CHECK_KEYS([-k key1], [first|both], [2], [none|second], [0])
+AT_CHECK_KEYS([-k key2], [second|both], [2], [none|first], [0])
+AT_CHECK_KEYS([-k key1,key2], [both], [1], [none|first|second], [0])
+AT_CHECK_KEYS([-k key1 -k key2], [first|second|both], [3], [none], [0])
+AT_CLEANUP
index ef8548c9c4518689617a101411f0af71832b635d..ff2a300bd2916143ace4cf8ad047922ef306b718 100644 (file)
@@ -72,3 +72,6 @@ m4_include([aclibs.at])
 
 # Compatibility with foreign tools.
 m4_include([foreign.at])
+
+# Autoscan test
+m4_include([autoscan.at])