autoconf-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] GNU Autoconf source repository branch, master, updated. v2.61a-352


From: Eric Blake
Subject: [SCM] GNU Autoconf source repository branch, master, updated. v2.61a-352-g66b8003
Date: Tue, 29 Jan 2008 17:30:03 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Autoconf source repository".

http://git.sv.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=66b80031846458c5fa3ebb0378dd8103bb7657d8

The branch, master has been updated
       via  66b80031846458c5fa3ebb0378dd8103bb7657d8 (commit)
      from  9935105de6e18dba029660d60f42b8b81d7ac3c4 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 66b80031846458c5fa3ebb0378dd8103bb7657d8
Author: Eric Blake <address@hidden>
Date:   Tue Jan 29 10:24:12 2008 -0700

    More corner cases in testsuite VAR=VALUE handling.
    
    * lib/autotest/general.m4 (AT_INIT) <PREPARE_TESTS): Fix quoting
    bug.
    <PARSE_ARGS_END>: Also detect leading digits in assignments.
    * tests/autotest.at (Using atlocal): Enhance test to catch last
    bug.
    
    Signed-off-by: Eric Blake <address@hidden>

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog               |    7 +++++++
 lib/autotest/general.m4 |   17 +++++++++--------
 tests/autotest.at       |    9 +++++----
 3 files changed, 21 insertions(+), 12 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 8d592df..5af0f7d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2008-01-29  Eric Blake  <address@hidden>
 
+       More corner cases in testsuite VAR=VALUE handling.
+       * lib/autotest/general.m4 (AT_INIT) <PREPARE_TESTS): Fix quoting
+       bug.
+       <PARSE_ARGS_END>: Also detect leading digits in assignments.
+       * tests/autotest.at (Using atlocal): Enhance test to catch last
+       bug.
+
        * doc/autoconf.texi (Limitations of Builtins) <.>: Mention bash
        bug.
 
diff --git a/lib/autotest/general.m4 b/lib/autotest/general.m4
index 25b2d36..7c45a7a 100644
--- a/lib/autotest/general.m4
+++ b/lib/autotest/general.m4
@@ -525,11 +525,11 @@ do
 
     # Directory selection.
     --directory | -C )
-        at_prev=--directory
+       at_prev=--directory
        ;;
     --directory=* )
-        at_change_dir=:
-        at_dir=$at_optarg
+       at_change_dir=:
+       at_dir=$at_optarg
        ;;
 
     # Keywords.
@@ -569,9 +569,10 @@ m4_divert_push([PARSE_ARGS_END])dnl
     *=*)
        at_envvar=`expr "x$at_option" : 'x\([[^=]]*\)='`
        # Reject names that are not valid shell variable names.
-       test "x$at_envvar" = "x" ||
-         expr "x$at_envvar" : "[.*[^_$as_cr_alnum]]" >/dev/null &&
-         AS_ERROR([invalid variable name: $at_envvar])
+       case $at_envvar in
+         '' | [[0-9]]* | *[[!_$as_cr_alnum]]* )
+           AS_ERROR([invalid variable name: $at_envvar]) ;;
+       esac
        at_value=`AS_ECHO(["$at_optarg"]) | sed "s/'/'\\\\\\\\''/g"`
        # Export now, but save eval for later and for debug scripts.
        export $at_envvar
@@ -719,7 +720,7 @@ done
 : ${at_top_build_prefix=$at_top_builddir}
 
 # Perform any assignments requested during argument parsing.
-eval $at_debug_args
+eval "$at_debug_args"
 
 # atconfig delivers names relative to the directory the test suite is
 # in, but the groups themselves are run in testsuite-dir/group-dir.
@@ -1033,7 +1034,7 @@ _ATEOF
        if test -d "$at_group_dir"; then
          find "$at_group_dir" -type d ! -perm -700 -exec chmod u+rwx \{\} \;
          rm -fr "$at_group_dir"
-        fi
+       fi
        rm -f "$at_test_source"
       fi
       ;;
diff --git a/tests/autotest.at b/tests/autotest.at
index 2fb36e5..4e016d7 100644
--- a/tests/autotest.at
+++ b/tests/autotest.at
@@ -398,16 +398,16 @@ AT_CHECK([(cd micro-suite.dir/1 && ./run MY_VAR='one 
space')],
 
 # Setting default variable values via atlocal.
 AT_CHECK_AT_TEST([Using atlocal],
-  [AT_CHECK([test "x$MY_VAR" = xset || exit 42])],
+  [AT_CHECK([test "x$MY_VAR" = "xodd;  'string" || exit 42])],
   [], [1], [ignore], [ignore], [
 dnl check that command line can set variable
-AT_CHECK([$CONFIG_SHELL ./micro-suite MY_VAR=set], [0], [ignore])
+AT_CHECK([$CONFIG_SHELL ./micro-suite MY_VAR="odd;  'string"], [0], [ignore])
 dnl check that command line overrides environment
-AT_CHECK([MY_VAR=set $CONFIG_SHELL ./micro-suite MY_VAR=unset],
+AT_CHECK([MY_VAR="odd;  'string" $CONFIG_SHELL ./micro-suite MY_VAR=unset],
          [1], [ignore], [ignore])
 dnl check that atlocal can give it a default
 AT_CHECK([cat <<EOF >atlocal
-MY_VAR=set
+MY_VAR="odd;  'string"
 export MY_VAR
 dnl Also populate enough of atlocal to do what atconfig normally does.
 at_testdir=.
@@ -427,6 +427,7 @@ dnl check that command line overrides atlocal
 AT_CHECK([$CONFIG_SHELL ./micro-suite MY_VAR=], [1], [ignore], [ignore])
 dnl check that syntax error is detected
 AT_CHECK([$CONFIG_SHELL ./micro-suite =], [1], [], [ignore], [ignore])
+AT_CHECK([$CONFIG_SHELL ./micro-suite 1=2], [1], [], [ignore], [ignore])
 ])
 
 


hooks/post-receive
--
GNU Autoconf source repository




reply via email to

[Prev in Thread] Current Thread [Next in Thread]