* lib/autotest/general.m4 (_AT_NORMALIZE_TEST_GROUP_NUMBER): Use `eval'.

* doc/autoconf.texi ($@, case): Document Zsh limitations.
This commit is contained in:
Noah Misch 2007-05-07 19:56:56 +00:00
parent 18d78d3a55
commit 9492c4ce65
3 changed files with 22 additions and 3 deletions

View File

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

View 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:

View 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