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>.
# 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
])
# 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. ##
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
])
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