]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* tests/autotest.at (AT_NO_CMDSUBST): New macro to determine
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Tue, 14 Mar 2006 07:20:14 +0000 (07:20 +0000)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Tue, 14 Mar 2006 07:20:14 +0000 (07:20 +0000)
failure condition for `$(cmd)' style command substitutions.
(Parenthetical command substition, Multiline parenthetical
command substition): Use it.

ChangeLog
tests/autotest.at

index 3f31e6b88328e22d6b6a8ff80ed3282f5b496d2b..564c3340b75d3f9d4e2ec5b637cf583188295988 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2006-03-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
+       * tests/autotest.at (AT_NO_CMDSUBST): New macro to determine
+       failure condition for `$(cmd)' style command substitutions.
+       (Parenthetical command substition, Multiline parenthetical
+       command substition): Use it.
+
        * doc/autoconf.texi (Special Shell Variables): Missing word.
        Reported by Keith Marshall <keith.marshall@total.com>.
 
index 95594a3e849737c5f4f42d477975290b1a8bb042..d53d98c4f71efb4296e9563862007e99b259c400 100644 (file)
@@ -47,8 +47,8 @@ AT_DATA([mysuite.at], [$2])
 # log file it generates will overwrite the log that the Autoconf test
 # suite produces for this test case.
 AT_CHECK_AUTOM4TE([--language=autotest -o micro-suite mysuite.at])
-AT_CHECK([./micro-suite],       m4_default([$4], 0), [ignore], [$6])
-AT_CHECK([./micro-suite -v -x], m4_default([$4], 0), [ignore], [$6])
+AT_CHECK([$CONFIG_SHELL ./micro-suite],       m4_default([$4], 0), [ignore], [$6])
+AT_CHECK([$CONFIG_SHELL ./micro-suite -v -x], m4_default([$4], 0), [ignore], [$6])
 AT_CLEANUP
 ])
 
@@ -68,6 +68,11 @@ AT_CLEANUP
 # Here documents for these tests contain forbidden macros.
 m4_pattern_allow([^AT_])
 
+# AT_NO_CMDSUBST
+# --------------
+m4_define([AT_NO_CMDSUBST],
+[if (eval 'foo=$(echo bar) && test "$foo" = bar') >/dev/null 2>&1; then false; else :; fi])
+
 
 ## ------------------ ##
 ## Empty test suite.  ##
@@ -105,7 +110,9 @@ two
 
 AT_CHECK_AT_TEST([Backquote command substition],
   [AT_CHECK([echo `echo hi`], 0, [hi
-], [])])
+], [])],
+  [AT_NO_CMDSUBST])
+
 
 AT_CHECK_AT_TEST([Multiline backquote command substition],
   [AT_DATA([myfile],[foo
@@ -113,7 +120,8 @@ bar
 ])
    AT_CHECK([echo "`cat myfile`"], 0, [foo
 bar
-], [])])
+], [])],
+  [AT_NO_CMDSUBST])
 
 AT_CHECK_AT_TEST([Parenthetical command substition],
   [AT_CHECK([echo $(echo hi)], 0, [hi