nvm/test/fast/Listing paths/Running "nvm which 0.0.2" s...

22 lines
484 B
Plaintext
Raw Normal View History

2014-11-22 09:51:49 +08:00
#!/bin/sh
mkdir ../../../v0.0.2
mkdir ../../../v0.0.20
. ../../../nvm.sh
die () { echo $@ ; exit 1; }
# The result should contain only the appropriate version numbers.
nvm which 0.0.2
nvm which 0.0.2 | grep "$NVM_DIR/v0.0.2/bin/node" > /dev/null
2014-11-22 09:51:49 +08:00
if [ $? -ne 0 ]; then
die '"nvm which 0.0.2" did not contain the correct path'
fi
nvm which 0.0.20 | grep "$NVM_DIR/v0.0.20/bin/node" > /dev/null
2014-11-22 09:51:49 +08:00
if [ $? -ne 0 ]; then
die '"nvm which 0.0.2" did not contain the correct path'
fi