]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* lib/autotest/general.m4 (_AT_NORMALIZE_TEST_GROUP_NUMBER): Use `eval'.
authorNoah Misch <noah@cs.caltech.edu>
Mon, 7 May 2007 19:56:56 +0000 (19:56 +0000)
committerNoah Misch <noah@cs.caltech.edu>
Mon, 7 May 2007 19:56:56 +0000 (19:56 +0000)
* doc/autoconf.texi ($@, case): Document Zsh limitations.

ChangeLog
doc/autoconf.texi
lib/autotest/general.m4

index 34ad5c09a9ca1ec9e799f0e136e85b0084515ae6..4c158f5a531288ee200a1284d1a85136a70f282d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-05-05  Noah Misch  <noah@cs.caltech.edu>
+
+       * lib/autotest/general.m4 (_AT_NORMALIZE_TEST_GROUP_NUMBER): Use `eval'.
+       * doc/autoconf.texi ($@, case): Document Zsh limitations.
+
 2007-05-03  Stepan Kasal  <kasal@ucw.cz>
 
        * lib/autoconf/lang.m4 (_AC_COMPILER_EXEEXT_DEFAULT): Put a.out first.
index 05c3b29ad50485458d0d14e942f92cfe2c1c0d88..28c93ca2fc1a392264c0f9fd7ae4fbaa60f6c5f1 100644 (file)
@@ -11600,6 +11600,10 @@ One workaround relies on Zsh's ``global aliases'' to convert
 test "$@{ZSH_VERSION+set@}" = set && alias -g '$@{1+"$@@"@}'='"$@@"'
 @end example
 
+Zsh only recognizes this alias when a shell word matches it exactly;
+@samp{"foo"$@{1+"$@@"@}} remains subject to word splitting.  Since this
+case always yields at least one shell word, use plain @samp{"$@@"}.
+
 A more conservative workaround is to avoid @samp{"$@@"} if it is
 possible that there may be no positional arguments.  For example,
 instead of:
@@ -12358,6 +12362,16 @@ esac
 but the @code{(} in this example is not portable to many Bourne
 shell implementations.  It can be omitted safely.
 
+Zsh handles pattern fragments derived from parameter expansions or
+command substitutions as though quoted:
+
+@example
+$ pat=\?; case aa in ?$pat) echo match;; esac
+$ pat=\?; case a? in ?$pat) echo match;; esac
+match
+@end example
+
+@noindent
 Because of a bug in its @code{fnmatch}, Bash fails to properly
 handle backslashes in character classes:
 
index 95fd76947499b2ead075508f8d45e1a8fb4c1f8d..04a1f9524437bd3057e2b26d2ae3f577b16c16b3 100644 (file)
@@ -154,12 +154,12 @@ m4_define([AT_LINE],
 # all the other test group numbers.
 m4_define([_AT_NORMALIZE_TEST_GROUP_NUMBER],
 [
-  while :; do
+  eval 'while :; do
     case $$1 in #(
-    $at_format*) break;;
+    '"$at_format"'*) break;;
     esac
     $1=0$$1
-  done
+  done'
 ])
 
 # _AT_CREATE_DEBUGGING_SCRIPT