diff --git a/ChangeLog b/ChangeLog index 3f31e6b8..564c3340 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2006-03-14 Ralf Wildenhues + * 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 . diff --git a/tests/autotest.at b/tests/autotest.at index 95594a3e..d53d98c4 100644 --- a/tests/autotest.at +++ b/tests/autotest.at @@ -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