* 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.
This commit is contained in:
Ralf Wildenhues 2006-03-14 07:20:14 +00:00
parent 1e50e55ff9
commit c36fc65ca5
2 changed files with 17 additions and 4 deletions

View File

@ -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>.

View 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