2010-08-25 Eric Blake <eblake@redhat.com>
+ m4sh: reduce size of AS_VAR_TEST_SET
+ * lib/m4sugar/m4sh.m4 (AS_VAR_TEST_SET): Make more compact.
+
tests: improve some shell assumption testing
* tests/m4sh.at (Functions Support, Functions and return Support)
(Negated classes in globbing): Update comments.
# AS_VAR_TEST_SET(VARIABLE)
# -------------------------
-# Expands into the `test' expression which is true if VARIABLE
+# Expands into an expression which is true if VARIABLE
# is set. Polymorphic.
m4_define([AS_VAR_TEST_SET],
[AS_LITERAL_WORD_IF([$1],
- [test "${$1+set}" = set],
- [{ as_var=$1; eval "test \"\${$as_var+set}\" = set"; }],
- [eval "test \"\${$1+set}\"" = set])])
+ [${$1+:} false],
+ [{ as_var=$1; eval \${$as_var+:} false; }],
+ [eval \${$1+:} false])])
## -------------------- ##