From 2152c1e75fa9e3022faa01f7b550dba84c4b7ebe Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Thu, 4 Oct 2007 15:31:41 -0600 Subject: [PATCH] Fix recent testsuite failures. * lib/autotest/general.m4 (AT_INIT, AT_SETUP): Double-quote text that must not be re-expanded after AS_ESCAPE. * lib/m4sugar/m4sh.m4 (_AS_IDENTIFIER_IF): Don't expand $1 when checking if it is an identifier. Signed-off-by: Eric Blake --- ChangeLog | 6 ++++++ lib/autotest/general.m4 | 4 ++-- lib/m4sugar/m4sh.m4 | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index ed77090b..9052228d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2007-10-04 Eric Blake + Fix recent testsuite failures. + * lib/autotest/general.m4 (AT_INIT, AT_SETUP): Double-quote text + that must not be re-expanded after AS_ESCAPE. + * lib/m4sugar/m4sh.m4 (_AS_IDENTIFIER_IF): Don't expand $1 when + checking if it is an identifier. + Whitespace cleanup. * lib/autotest/general.m4 (_AT_CREATE_DEBUGGING_SCRIPT): Avoid leading whitespace, as it caused space-tab in testsuite. diff --git a/lib/autotest/general.m4 b/lib/autotest/general.m4 index b55741dd..5390d498 100644 --- a/lib/autotest/general.m4 +++ b/lib/autotest/general.m4 @@ -304,7 +304,7 @@ at_groups_all='AT_groups_all' # numerical order. at_format='m4_bpatsubst(m4_defn([AT_ordinal]), [.], [?])' # Description of all the test groups. -at_help_all="AS_ESCAPE(m4_defn([AT_help_all]))"])])dnl +at_help_all="AS_ESCAPE(m4_dquote(m4_defn([AT_help_all])))"])])dnl m4_divert_push([PARSE_ARGS])dnl at_prev= @@ -1202,7 +1202,7 @@ m4_append([AT_groups_all], [ ]m4_defn([AT_ordinal])) m4_divert_push([TESTS])dnl AT_ordinal ) @%:@ AT_ordinal. m4_defn([AT_line]): m4_defn([AT_description]) at_setup_line='m4_defn([AT_line])' - at_desc="AS_ESCAPE(m4_defn([AT_description]))" + at_desc="AS_ESCAPE(m4_dquote(m4_defn([AT_description])))" $at_quiet AS_ECHO_N(["m4_format([%3d: ], AT_ordinal)$at_desc"]dnl ["m4_format(%m4_eval(47 - m4_qlen(m4_defn([AT_description])))[s])"]) m4_divert_push([TEST_SCRIPT])dnl diff --git a/lib/m4sugar/m4sh.m4 b/lib/m4sugar/m4sh.m4 index 025934d8..26326f5e 100644 --- a/lib/m4sugar/m4sh.m4 +++ b/lib/m4sugar/m4sh.m4 @@ -1249,7 +1249,7 @@ m4_define([AS_IDENTIFIER_IF], [_$0(m4_bpatsubst([[$1]], [@&t@]), [$2], [$3])])]) m4_define([_AS_IDENTIFIER_IF], [m4_if([$1], [], [$3], - m4_translit([$1], ]m4_dquote(m4_defn([m4_cr_symbols2]))[), [], + m4_translit([[$1]], ]m4_dquote(m4_defn([m4_cr_symbols2]))[), [], [m4_if(m4_len(m4_translit(m4_format([[%.1s]], [$1]), ]]dnl m4_dquote(m4_dquote(m4_defn([m4_cr_symbols1])))[[)), [0], [$2], [$3])], [$3])]) -- 2.47.2