Browse Source

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

master
Jordan Harband 11 years ago
parent
commit
8284cd0f81
  1. 8
      test/fast/Listing versions/Running "nvm ls stable" and "nvm ls unstable" should return the appropriate implicit alias

8
test/fast/Listing versions/Running "nvm ls stable" and "nvm ls unstable" should return the appropriate implicit alias

@ -4,6 +4,9 @@ @@ -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 \ @@ -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"

Loading…
Cancel
Save