]> Sergey Matveev's repositories - zsh-autoenv.git/commitdiff
tests: setup.sh: doc / more verbose
authorDaniel Hahler <git@thequod.de>
Sun, 25 Jan 2015 18:50:27 +0000 (19:50 +0100)
committerDaniel Hahler <git@thequod.de>
Sun, 25 Jan 2015 18:50:27 +0000 (19:50 +0100)
tests/setup.sh

index 557b9e77cb5f471f13a57ef5206b09e099fa7ad1..5dcb62b1010483c577a7a377cb54753d25262be1 100644 (file)
@@ -1,3 +1,7 @@
+# Setup for tests.
+#
+# It returns 1 in case of errors, and no tests should be run then!
+#
 # Ensure we have our mocked out AUTOENV_ENV_FILENAME
 # (via .zshenv).
 
@@ -5,7 +9,10 @@
 # Not handled in varstash yet.
 # setopt nounset
 
-[[ $AUTOENV_ENV_FILENAME[0,4] == '/tmp' ]] || return 1
+if [[ $AUTOENV_ENV_FILENAME[0,4] != '/tmp' ]]; then
+  echo "AUTOENV_ENV_FILENAME is not in /tmp. Aborting."
+  return 1
+fi
 
 # Reset any authentication.
 echo -n >| $AUTOENV_ENV_FILENAME