[Tests] use -ex option during tests when possible

Relates to #1130
This commit is contained in:
Jordan Harband
2016-07-07 00:00:59 -07:00
parent 186eb8838d
commit ecbd7d4572
21 changed files with 115 additions and 40 deletions

View File

@@ -1,5 +1,7 @@
#!/bin/sh
set -ex
cd ../..
mkdir v0.0.1
mkdir src/node-v0.0.1
@@ -8,7 +10,7 @@ sudo touch v0.0.1/sudo
. ./nvm.sh
RETURN_MESSAGE="$(nvm uninstall v0.0.1 2>&1)"
RETURN_MESSAGE="$(nvm uninstall v0.0.1 2>&1 || echo)"
CHECK_FOR="Cannot uninstall, incorrect permissions on installation folder"
test "${RETURN_MESSAGE#*$CHECK_FOR}" != "$RETURN_MESSAGE" || exit 1
[ "${RETURN_MESSAGE#*$CHECK_FOR}" != "$RETURN_MESSAGE" ] || exit 1