tests: fix setup for older Zsh
authorStefano Lattarini <stefano.lattarini@gmail.com>
Sat, 23 Jun 2012 08:34:29 +0000 (10:34 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Sat, 23 Jun 2012 08:34:29 +0000 (10:34 +0200)
* defs-static.in: After the addition of TAP-based tests and our renaming
of "simple" test scripts from 'tests/foo.test' to 't/foo.sh', a test name
is valid if it matches the wildcard "*.sh" or "*.tap", not the wildcard
"*.test".  Adjust accordingly.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
defs-static.in

index 1dfd8d3..0647dda 100644 (file)
@@ -46,7 +46,7 @@ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
   # Note: the apparently useless 'eval' below are needed by at least
   # dash 0.5.2, to prevent it from bailing out with an error like
   # "Syntax error: Bad substitution"
-  if eval '[[ "$0" = *."test" ]]'; then
+  if eval '[[ "$0" = *."tap" || "$0" = *."sh" ]]'; then
     # Good, FUNCTION_ARGZERO option was already off when this file was
     # sourced.  Thus we've nothing to do.
     argv0=$0