Move node-specific installation tests to their own directory.

master
Jordan Harband 2015-01-17 11:26:52 -06:00
parent 78c1f2cf9d
commit 9615672243
9 changed files with 26 additions and 26 deletions

View File

@ -2,13 +2,13 @@
die () { echo $@ ; exit 1; }
. ../../nvm.sh
. ../../../nvm.sh
[ "$(nvm install invalid.invalid 2>&1)" = "Version 'invalid.invalid' not found - try \`nvm ls-remote\` to browse available versions." ] || die "nvm installing an invalid version did not print a nice error message"
# Remove the stuff we're clobbering.
[ -e ../../v0.9.7 ] && rm -R ../../v0.9.7
[ -e ../../v0.9.12 ] && rm -R ../../v0.9.12
[ -e ../../../v0.9.7 ] && rm -R ../../../v0.9.7
[ -e ../../../v0.9.12 ] && rm -R ../../../v0.9.12
# Install from binary
nvm install 0.9.7

View File

@ -2,17 +2,17 @@
die () { echo $@ ; exit 1; }
. ../../nvm.sh
. ../../../nvm.sh
NVM_TEST_VERSION=v0.10.7
# Remove the stuff we're clobbering.
[ -e ../../$NVM_TEST_VERSION ] && rm -R ../../$NVM_TEST_VERSION
[ -e ../../../$NVM_TEST_VERSION ] && rm -R ../../../$NVM_TEST_VERSION
# Install from binary
nvm install $NVM_TEST_VERSION || die "install $NVM_TEST_VERSION failed"
# Check
[ -d ../../$NVM_TEST_VERSION ]
[ -d ../../../$NVM_TEST_VERSION ]
nvm run $NVM_TEST_VERSION --version | grep $NVM_TEST_VERSION || die "'nvm run $NVM_TEST_VERSION --version | grep $NVM_TEST_VERSION' failed"

View File

@ -2,17 +2,17 @@
die () { echo $@ ; exit 1; }
. ../../nvm.sh
. ../../../nvm.sh
NVM_TEST_VERSION=v0.10.7
# Remove the stuff we're clobbering.
[ -e ../../$NVM_TEST_VERSION ] && rm -R ../../$NVM_TEST_VERSION
[ -e ../../../$NVM_TEST_VERSION ] && rm -R ../../../$NVM_TEST_VERSION
# Install from source
nvm install -s $NVM_TEST_VERSION || die "'nvm install -s $NVM_TEST_VERSION' failed"
# Check
[ -d ../../$NVM_TEST_VERSION ]
[ -d ../../../$NVM_TEST_VERSION ]
nvm run $NVM_TEST_VERSION --version | grep $NVM_TEST_VERSION || "'nvm run $NVM_TEST_VERSION --version | grep $NVM_TEST_VERSION' failed"

View File

@ -2,19 +2,19 @@
die () { echo $@ ; exit 1; }
. ../../nvm.sh
. ../../../nvm.sh
# Remove the stuff we're clobbering.
[ -e ../../v0.9.7 ] && rm -R ../../v0.9.7
[ -e ../../v0.9.12 ] && rm -R ../../v0.9.12
[ -e ../../../v0.9.7 ] && rm -R ../../../v0.9.7
[ -e ../../../v0.9.12 ] && rm -R ../../../v0.9.12
# Install from binary
nvm install 0.9.7 || die "'nvm install 0.9.7' failed"
nvm i 0.9.12 || die "'nvm i 0.9.12' failed"
# Check
[ -d ../../v0.9.7 ] || die "v0.9.7 didn't exist"
[ -d ../../v0.9.12 ] || die "v0.9.12 didn't exist"
[ -d ../../../v0.9.7 ] || die "v0.9.7 didn't exist"
[ -d ../../../v0.9.12 ] || die "v0.9.12 didn't exist"
# Use the first one
nvm use 0.9.7 || die "'nvm use 0.9.7' failed"

View File

@ -2,12 +2,12 @@
die () { echo $@ ; exit 1; }
. ../../nvm.sh
. ../../../nvm.sh
NVM_TEST_VERSION=v0.10.7
# Remove the stuff we're clobbering.
[ -e ../../$NVM_TEST_VERSION ] && rm -R ../../$NVM_TEST_VERSION
[ -e ../../../$NVM_TEST_VERSION ] && rm -R ../../../$NVM_TEST_VERSION
# Install from binary
echo "$NVM_TEST_VERSION" > .nvmrc
@ -15,7 +15,7 @@ echo "$NVM_TEST_VERSION" > .nvmrc
nvm install || die "'nvm install' failed"
# Check
[ -d ../../$NVM_TEST_VERSION ] || die "./$NVM_TEST_VERSION did not exist"
[ -d ../../../$NVM_TEST_VERSION ] || die "./$NVM_TEST_VERSION did not exist"
nvm run $NVM_TEST_VERSION --version | grep $NVM_TEST_VERSION \
|| "'nvm run $NVM_TEST_VERSION --version | grep $NVM_TEST_VERSION' failed"

View File

@ -2,12 +2,12 @@
die () { echo $@ ; exit 1; }
. ../../nvm.sh
. ../../../nvm.sh
NVM_TEST_VERSION=v0.10.7
# Remove the stuff we're clobbering.
[ -e ../../$NVM_TEST_VERSION ] && rm -R ../../$NVM_TEST_VERSION
[ -e ../../../$NVM_TEST_VERSION ] && rm -R ../../../$NVM_TEST_VERSION
# Install from binary
echo "$NVM_TEST_VERSION" > .nvmrc
@ -15,7 +15,7 @@ echo "$NVM_TEST_VERSION" > .nvmrc
nvm install -s || "'nvm install -s' failed"
# Check
[ -d ../../$NVM_TEST_VERSION ] || die "$NVM_TEST_VERSION did not exist"
[ -d ../../../$NVM_TEST_VERSION ] || die "$NVM_TEST_VERSION did not exist"
nvm run $NVM_TEST_VERSION --version | grep $NVM_TEST_VERSION \
|| die "'nvm run $NVM_TEST_VERSION --version | grep $NVM_TEST_VERSION' failed"

View File

@ -2,17 +2,17 @@
die () { echo $@ ; exit 1; }
. ../../nvm.sh
. ../../../nvm.sh
# Remove the stuff we're clobbering.
[ -e ../../v0.9.7 ] && rm -R ../../v0.9.7
[ -e ../../v0.9.12 ] && rm -R ../../v0.9.12
[ -e ../../../v0.9.7 ] && rm -R ../../../v0.9.7
[ -e ../../../v0.9.12 ] && rm -R ../../../v0.9.12
# Install from binary
nvm install 0.9.7
# Check
[ -d ../../v0.9.7 ] || die "nvm install 0.9.7 didn't install"
[ -d ../../../v0.9.7 ] || die "nvm install 0.9.7 didn't install"
nvm use 0.9.7
@ -25,7 +25,7 @@ nvm ls 0.9 | grep v0.9.7 > /dev/null || die "nvm ls 0.9 didn't show v0.9.7"
nvm install 0.9.12 --reinstall-packages-from=0.9 || die "nvm install 0.9.12 --reinstall-packages-from=0.9 failed"
[ -d ../../v0.9.12 ] || die "nvm install 0.9.12 didn't install"
[ -d ../../../v0.9.12 ] || die "nvm install 0.9.12 didn't install"
nvm use 0.9
node --version | grep v0.9.12 > /dev/null || die "nvm ls 0.9 didn't use v0.9.12"

View File

@ -1,6 +1,6 @@
#!/bin/sh
. ../../nvm.sh
. ../../../nvm.sh
nvm deactivate
nvm uninstall v0.10.7