* 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-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,
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)
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)
--- /dev/null
+# -*- 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
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
# Compatibility with foreign tools.
m4_include([foreign.at])
+
+# Autoscan test
+m4_include([autoscan.at])