You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
861 B
43 lines
861 B
13 years ago
|
#!/bin/sh
|
||
|
|
||
8 years ago
|
\. ../../../nvm.sh
|
||
7 years ago
|
\. ../../common.sh
|
||
13 years ago
|
|
||
7 years ago
|
make_fake_node v0.1.3
|
||
|
make_fake_node v0.2.3
|
||
|
make_fake_node v0.20.3
|
||
9 years ago
|
|
||
8 years ago
|
die () { echo "$@" ; exit 1; }
|
||
11 years ago
|
|
||
13 years ago
|
# The result should contain only the appropriate version numbers.
|
||
11 years ago
|
|
||
|
nvm ls 0.1 | grep 'v0.2.3' > /dev/null
|
||
|
if [ $? -eq 0 ]; then
|
||
|
echo '"nvm ls 0.1" contained v0.2.3'
|
||
|
fi
|
||
|
|
||
|
nvm ls 0.1 | grep 'v0.20.3' > /dev/null
|
||
|
if [ $? -eq 0 ]; then
|
||
|
die '"nvm ls 0.1" contained v0.20.3'
|
||
|
fi
|
||
|
|
||
|
nvm ls 0.1 | grep 'v0.1.3' > /dev/null
|
||
|
if [ $? -ne 0 ]; then
|
||
|
die '"nvm ls 0.1" did not contain v0.1.3'
|
||
|
fi
|
||
|
|
||
|
nvm ls 0.2 | grep 'v0.2.3' > /dev/null
|
||
|
if [ $? -ne 0 ]; then
|
||
|
die '"nvm ls 0.2" did not contain v0.2.3'
|
||
|
fi
|
||
|
|
||
|
nvm ls 0.2 | grep 'v0.20.3' > /dev/null
|
||
|
if [ $? -eq 0 ]; then
|
||
|
die '"nvm ls 0.2" contained v0.20.3'
|
||
|
fi
|
||
|
|
||
|
nvm ls 0.2 | grep 'v0.2.3' > /dev/null
|
||
|
if [ $? -ne 0 ]; then
|
||
|
die '"nvm ls 0.2" did not contain v0.2.3'
|
||
|
fi
|