Missed tests

master
Dr. Kibitz 2014-02-18 22:07:25 -08:00
parent a9be598241
commit 0f709eafa0
3 changed files with 10 additions and 6 deletions

View File

@ -2,8 +2,12 @@
. ../../../nvm.sh
mkdir ../../../v0.0.{1,3,9}
mkdir ../../../v0.3.{1,3,9}
mkdir ../../../v0.0.1
mkdir ../../../v0.0.3
mkdir ../../../v0.0.9
mkdir ../../../v0.3.1
mkdir ../../../v0.3.3
mkdir ../../../v0.3.9
# The result should contain the version numbers.
nvm ls | grep v0.0.1 &&

View File

@ -3,4 +3,4 @@
die () { echo $@ ; exit 1; }
. ../../nvm.sh
[[ $(nvm current) == *"current"* ]] || die "Failed to find current version"
[ `expr "$(nvm current)" : ".*current"` != 0 ] || die "Failed to find current version"

View File

@ -4,11 +4,11 @@ mkdir -p ../../v0.2.3
die () { echo $@ ; exit 1; }
[[ $PATH != *v0.2.3/*/bin* ]] || echo "WARNING: Unexpectedly found v0.2.3 already active" >&2
[ `expr $PATH : ".*v0.2.3/.*/bin"` == 0 ] || echo "WARNING: Unexpectedly found v0.2.3 already active" >&2
. ../../nvm.sh
nvm use v0.2.3 &&
[[ $PATH == *v0.2.3/*/bin* ]] || die "Failed to activate v0.2.3"
[ `expr $PATH : ".*v0.2.3/.*/bin"` != 0 ] || die "Failed to activate v0.2.3"
nvm deactivate &&
[[ $PATH != *v0.2.3/*/bin* ]] || die "Failed to deactivate v0.2.3"
[ `expr $PATH : ".*v0.2.3/.*/bin"` != 0 ] || die "Failed to deactivate v0.2.3"