Ensuring that there's a stable and unstable version "available" for this test.

master
Jordan Harband 2014-10-21 01:02:59 -07:00
parent e421a0dc5f
commit 8284cd0f81
1 changed files with 6 additions and 2 deletions

View File

@ -4,6 +4,9 @@
die () { echo $@ ; exit 1; }
mkdir ../../../v0.2.3
mkdir ../../../v0.3.3
EXPECTED_STABLE="$(nvm_print_implicit_alias local stable)"
STABLE_VERSION="$(nvm_version "$EXPECTED_STABLE")"
@ -19,7 +22,8 @@ nvm ls unstable | \grep "$UNSTABLE_VERSION" >/dev/null \
mkdir ../../../v0.1.2
nvm alias stable 0.1
nvm ls stable | \grep -v "$STABLE_VERSION" >/dev/null \
|| die "'nvm ls stable' contained $STABLE_VERSION instead of v0.1.2"
nvm ls stable | \grep v0.1.2 >/dev/null \
&& nvm ls stable | \grep -v "$STABLE_VERSION" >/dev/null \
|| die "'nvm ls stable' did not contain an explicit 'stable' alias"
|| die "'nvm ls stable' did not contain v0.1.2"