autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AT_KEYWORDS failure: cmdline OR-combinations


From: Ralf Wildenhues
Subject: AT_KEYWORDS failure: cmdline OR-combinations
Date: Mon, 15 Aug 2005 18:22:09 +0200
User-agent: Mutt/1.4.1i

The following (arguably ugly-written) test shows that
  ./testsuite -k key1 -k key2
do not work as advertised.

I can guess that my patch[1] which fixed the behavior of
  ./testsuite --help
in the presence of multiple keys per test was wrong or insufficient;
  ./testsuite -k key1 -k key2 --help

does not work either (but is not tested by the patch below).

Can somebody more intimate with the autotest code fix all of this?

Cheers,
Ralf

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

Index: tests/autotest.at
===================================================================
RCS file: /cvsroot/autoconf/autoconf/tests/autotest.at,v
retrieving revision 1.6
diff -u -r1.6 autotest.at
--- tests/autotest.at   14 May 2005 07:00:40 -0000      1.6
+++ tests/autotest.at   14 Aug 2005 15:48:37 -0000
@@ -241,3 +241,51 @@
 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_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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]