[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,12 +1,13 @@
#!/bin/sh
fail () { echo $@ ; exit 1; }
set -ex
die () { echo $@ ; exit 1; }
. ../../nvm.sh
type nvm > /dev/null 2>&1 || fail "NVM not loaded"
type nvm > /dev/null 2>&1 || die "nvm not loaded"
nvm unload
type nvm > /dev/null 2>&1 && fail "NVM not unloaded" || exit 0
! type nvm > /dev/null 2>&1 || die "nvm not unloaded"