mirror of
git://git.sv.gnu.org/autoconf
synced 2025-01-18 10:45:15 +08:00
Fix typos in recent testsuite improvements.
* lib/autotest/general.m4 (AT_INIT) <at_fn_check_prepare_dynamic>: Fix typo. * NEWS: Clarify the potential impact to users. * tests/autotest.at (AT_DATA_AUTOTEST): New macro, patterned after AT_DATA_M4SUGAR. (AT_CHECK_AT_PREP, AT_CHECK_AT_TITLE): Use it. (unusual file names): Test that the recent echo fix does not regress. Fix quoting bug that made the test a no-op. Reported by Paolo Bonzini and Ralf Wildenhues. Signed-off-by: Eric Blake <ebb9@byu.net>
This commit is contained in:
parent
83ad597b88
commit
a8a9b2148d
13
ChangeLog
13
ChangeLog
@ -1,3 +1,16 @@
|
|||||||
|
2008-11-21 Eric Blake <ebb9@byu.net>
|
||||||
|
|
||||||
|
Fix typos in recent testsuite improvements.
|
||||||
|
* lib/autotest/general.m4 (AT_INIT) <at_fn_check_prepare_dynamic>:
|
||||||
|
Fix typo.
|
||||||
|
* NEWS: Clarify the potential impact to users.
|
||||||
|
* tests/autotest.at (AT_DATA_AUTOTEST): New macro, patterned after
|
||||||
|
AT_DATA_M4SUGAR.
|
||||||
|
(AT_CHECK_AT_PREP, AT_CHECK_AT_TITLE): Use it.
|
||||||
|
(unusual file names): Test that the recent echo fix does not
|
||||||
|
regress. Fix quoting bug that made the test a no-op.
|
||||||
|
Reported by Paolo Bonzini and Ralf Wildenhues.
|
||||||
|
|
||||||
2008-11-21 Eric Blake <ebb9@byu.net>
|
2008-11-21 Eric Blake <ebb9@byu.net>
|
||||||
|
|
||||||
Use modern m4sh constructs in autoconf.
|
Use modern m4sh constructs in autoconf.
|
||||||
|
10
NEWS
10
NEWS
@ -30,11 +30,11 @@ GNU Autoconf NEWS - User visible changes.
|
|||||||
m4_copy m4_dumpdefs m4_rename
|
m4_copy m4_dumpdefs m4_rename
|
||||||
|
|
||||||
** The m4sugar macro m4_expand has been taught to handle unterminated
|
** The m4sugar macro m4_expand has been taught to handle unterminated
|
||||||
comments and shell case statements. As a result, it is used in
|
comments and shell case statements. As a result, it is used
|
||||||
more places, such as AC_DEFINE and AT_CHECK. Most uses should not
|
internally in more places, such as AC_DEFINE and AT_CHECK. Most
|
||||||
behave any differently; however, it may be necessary to add
|
uses of AC_DEFINE and AT_CHECK should not behave any differently;
|
||||||
double-quoting around unbalanced `(' where single-quoting used to
|
however, it may be necessary to add double-quoting around
|
||||||
be sufficient.
|
unbalanced `(' where single-quoting used to be sufficient.
|
||||||
|
|
||||||
** The following documented m4sh macros are new:
|
** The following documented m4sh macros are new:
|
||||||
AS_LINENO_PREPARE AS_ME_PREPARE AS_SET_STATUS AS_VAR_APPEND
|
AS_LINENO_PREPARE AS_ME_PREPARE AS_SET_STATUS AS_VAR_APPEND
|
||||||
|
@ -287,7 +287,7 @@ at_fn_check_prepare_trace ()
|
|||||||
|
|
||||||
AS_FUNCTION_DESCRIBE([at_fn_check_prepare_dynamic], [COMMAND LINE],
|
AS_FUNCTION_DESCRIBE([at_fn_check_prepare_dynamic], [COMMAND LINE],
|
||||||
[Decide if COMMAND at LINE is traceable at runtime, and call the
|
[Decide if COMMAND at LINE is traceable at runtime, and call the
|
||||||
appropriate prepation function.])
|
appropriate preparation function.])
|
||||||
at_fn_check_prepare_dynamic ()
|
at_fn_check_prepare_dynamic ()
|
||||||
{
|
{
|
||||||
case "$at_traceon:$[1]" in
|
case "$at_traceon:$[1]" in
|
||||||
|
@ -20,6 +20,16 @@ AT_BANNER([Autotest.])
|
|||||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||||
# 02110-1301, USA.
|
# 02110-1301, USA.
|
||||||
|
|
||||||
|
|
||||||
|
# AT_DATA_AUTOTEST(FILE-NAME, CONTENTS)
|
||||||
|
# -------------------------------------
|
||||||
|
# Escape the invalid tokens with @&t@.
|
||||||
|
m4_define([AT_DATA_AUTOTEST],
|
||||||
|
[AT_DATA([$1],
|
||||||
|
[m4_bpatsubst([$2], [\(@.\)\(.@\)\|\(m4\|AS\|AT\)\(_\)\|\(d\)\(nl\)],
|
||||||
|
[\1\3\5@&t@\2\4\6])])])
|
||||||
|
|
||||||
|
|
||||||
# AT_CHECK_AT_PREP(NAME, SUITE-CODE, [STATUS = 0], [STDOUT], [STDERR],
|
# AT_CHECK_AT_PREP(NAME, SUITE-CODE, [STATUS = 0], [STDOUT], [STDERR],
|
||||||
# [DIR = .])
|
# [DIR = .])
|
||||||
# --------------------------------------------------------------------
|
# --------------------------------------------------------------------
|
||||||
@ -36,15 +46,15 @@ m4_pushdef([AT_dir], m4_ifval([$6], [[[$6]]], [.]))dnl
|
|||||||
dnl
|
dnl
|
||||||
AT_CAPTURE_FILE([$1.log])dnl
|
AT_CAPTURE_FILE([$1.log])dnl
|
||||||
dnl
|
dnl
|
||||||
AT_DATA(AT_dir[/package.m4],
|
AT_DATA_AUTOTEST(AT_dir[/package.m4],
|
||||||
[[m4_define([AT@&t@_PACKAGE_NAME], [GNU Nonsense])
|
[[m4_define([AT_PACKAGE_NAME], [GNU Nonsense])
|
||||||
m4_define([AT@&t@_PACKAGE_TARNAME], [nonsense])
|
m4_define([AT_PACKAGE_TARNAME], [nonsense])
|
||||||
m4_define([AT@&t@_PACKAGE_VERSION], [1.0])
|
m4_define([AT_PACKAGE_VERSION], [1.0])
|
||||||
m4_define([AT@&t@_PACKAGE_STRING], [GNU Nonsense 1.0])
|
m4_define([AT_PACKAGE_STRING], [GNU Nonsense 1.0])
|
||||||
m4_define([AT@&t@_PACKAGE_BUGREPORT], [bug-autoconf@gnu.org])
|
m4_define([AT_PACKAGE_BUGREPORT], [bug-autoconf@gnu.org])
|
||||||
]])
|
]])
|
||||||
dnl
|
dnl
|
||||||
AT_DATA(AT_dir[/$1.at], m4_bpatsubst([[$2]], [AT_], [AT@&t@_]))
|
AT_DATA_AUTOTEST(AT_dir[/$1.at], [$2])
|
||||||
m4_ifval([$6], [(cd AT_dir])
|
m4_ifval([$6], [(cd AT_dir])
|
||||||
AT_CHECK_AUTOM4TE([--language=autotest -o $1 $1.at], [$3], [$4], [$5])
|
AT_CHECK_AUTOM4TE([--language=autotest -o $1 $1.at], [$3], [$4], [$5])
|
||||||
m4_ifval([$6], [)])
|
m4_ifval([$6], [)])
|
||||||
@ -414,14 +424,14 @@ AT_CLEANUP
|
|||||||
m4_define([AT_CHECK_AT_TITLE],
|
m4_define([AT_CHECK_AT_TITLE],
|
||||||
[AT_CHECK_AT([$1],
|
[AT_CHECK_AT([$1],
|
||||||
[[
|
[[
|
||||||
m4@&t@_define([macro_name], [[macro_expanded]])
|
m4_define([macro_name], [[macro_expanded]])
|
||||||
m4@&t@_define([macro_expanded], [[macro_overexpanded]])
|
m4_define([macro_expanded], [[macro_overexpanded]])
|
||||||
m4@&t@_define([macro_backquote], [`])
|
m4_define([macro_backquote], [`])
|
||||||
m4@&t@_define([macro_single_quote], ['])
|
m4_define([macro_single_quote], ['])
|
||||||
m4@&t@_define([macro_double_quote], ["])
|
m4_define([macro_double_quote], ["])
|
||||||
]]dnl restore font-lock: "
|
]]dnl restore font-lock: "
|
||||||
[[m4@&t@_define([macro_backslash], [\])
|
[[m4_define([macro_backslash], [\])
|
||||||
m4@&t@_define([macro_echo], [$][1])
|
m4_define([macro_echo], [$][1])
|
||||||
AT_INIT([artificial test suite])
|
AT_INIT([artificial test suite])
|
||||||
AT_SETUP([$2])
|
AT_SETUP([$2])
|
||||||
AT_CHECK([:])
|
AT_CHECK([:])
|
||||||
@ -459,8 +469,8 @@ AT_CHECK_AT_TITLE_CHAR([Double-quote], ["])
|
|||||||
dnl restore font-lock: "
|
dnl restore font-lock: "
|
||||||
AT_CHECK_AT_TITLE_CHAR([Backslash], [\])
|
AT_CHECK_AT_TITLE_CHAR([Backslash], [\])
|
||||||
AT_CHECK_AT_TITLE_CHAR([Brackets], [[[]]], [[]])
|
AT_CHECK_AT_TITLE_CHAR([Brackets], [[[]]], [[]])
|
||||||
AT_CHECK_AT_TITLE_CHAR([Left bracket], [@<@&t@:@], [@<:@])
|
AT_CHECK_AT_TITLE_CHAR([Left bracket], [@<:@], [@<:@])
|
||||||
AT_CHECK_AT_TITLE_CHAR([Right bracket], [@:@&t@>@], [@:>@])
|
AT_CHECK_AT_TITLE_CHAR([Right bracket], [@:>@], [@:>@])
|
||||||
AT_CHECK_AT_TITLE_CHAR([Quoted pound], [[#]], [#])
|
AT_CHECK_AT_TITLE_CHAR([Quoted pound], [[#]], [#])
|
||||||
AT_CHECK_AT_TITLE_CHAR([Pound], [#])
|
AT_CHECK_AT_TITLE_CHAR([Pound], [#])
|
||||||
AT_CHECK_AT_TITLE_CHAR([Quoted comma], [[,]], [,])
|
AT_CHECK_AT_TITLE_CHAR([Quoted comma], [[,]], [,])
|
||||||
@ -696,7 +706,7 @@ AT_CHECK(:)
|
|||||||
AT_CLEANUP
|
AT_CLEANUP
|
||||||
AT_SETUP(both) # 04
|
AT_SETUP(both) # 04
|
||||||
AT_KEYWORDS([key1 key2])
|
AT_KEYWORDS([key1 key2])
|
||||||
AT_KEYWORDS([m4@&t@_echo([Key1])])
|
AT_KEYWORDS([m4_echo([Key1])])
|
||||||
AT_CHECK(:)
|
AT_CHECK(:)
|
||||||
AT_CLEANUP
|
AT_CLEANUP
|
||||||
AT_SETUP(test5) # 05
|
AT_SETUP(test5) # 05
|
||||||
@ -1027,24 +1037,25 @@ AT_CLEANUP
|
|||||||
|
|
||||||
AT_SETUP([unusual file names])
|
AT_SETUP([unusual file names])
|
||||||
|
|
||||||
AT_DATA_M4SUGAR([d@&t@nl.at],
|
AT_DATA_AUTOTEST([d@&t@nl.at],
|
||||||
[[AT@&t@_SETUP([test one])
|
[[AT_SETUP([test one])
|
||||||
m4_pattern_allow([^dnl$])
|
m4_pattern_allow([^dnl$])
|
||||||
AT@&t@_CHECK([test "]m4_dquote(AT@&t@_LINE)[" = dn[]l.at:3])
|
AT_CHECK([test "]m4_dquote(AT_LINE)[" = dn[]l.at:3])
|
||||||
AT@&t@_CLEANUP
|
AT_CLEANUP
|
||||||
]])
|
]])
|
||||||
|
|
||||||
mkdir sub
|
mkdir sub
|
||||||
AT_DATA_M4SUGAR([sub/"two spaces".at],
|
AT_DATA_AUTOTEST([sub/"two spaces".at],
|
||||||
[[AT@&t@_SETUP([test two])
|
[[AT_SETUP([test two])
|
||||||
AT@&t@_CHECK([test "]m4_dquote(AT@&t@_LINE)[" = "two spaces.at:2"])
|
AT_CHECK([test "]m4_dquote(AT_LINE)[" = "two spaces.at:2"])
|
||||||
AT@&t@_CLEANUP
|
AT_CLEANUP
|
||||||
]])
|
]])
|
||||||
|
|
||||||
AT_CHECK_AT_PREP([suite],
|
AT_CHECK_AT_PREP([suite],
|
||||||
[[AT_INIT([suite to check included file names])
|
[[AT_INIT([suite to check included file names])
|
||||||
m4@&t@_include([d][nl.at])
|
m4_include([d][nl.at])
|
||||||
m4@&t@_include([sub/two spaces.at])
|
m4_include([sub/two spaces.at])
|
||||||
]])
|
]])
|
||||||
AT_CHECK([$CONFIG_SHELL ./suite], [0], [ignore])
|
AT_CHECK([$CONFIG_SHELL ./suite], [0], [stdout])
|
||||||
|
AT_CHECK([grep 'two spaces' suite.log], [1])
|
||||||
AT_CLEANUP
|
AT_CLEANUP
|
||||||
|
Loading…
Reference in New Issue
Block a user