2014-09-29 01:18:00 +08:00
|
|
|
#!/bin/sh
|
|
|
|
|
2016-11-04 13:15:18 +08:00
|
|
|
\. ../../../nvm.sh
|
2018-06-14 01:38:19 +08:00
|
|
|
\. ../../common.sh
|
2014-09-29 01:18:00 +08:00
|
|
|
|
2018-06-14 01:38:19 +08:00
|
|
|
make_fake_node v0.0.2
|
|
|
|
make_fake_node v0.0.20
|
2016-06-27 06:52:26 +08:00
|
|
|
|
2016-11-07 03:34:36 +08:00
|
|
|
die () { echo "$@" ; exit 1; }
|
2014-09-29 01:18:00 +08:00
|
|
|
|
|
|
|
# The result should contain only the appropriate version numbers.
|
|
|
|
|
|
|
|
nvm ls 0.0.2 | grep 'v0.0.2' > /dev/null
|
|
|
|
if [ $? -eq 0 ]; then
|
|
|
|
echo '"nvm ls 0.0.2" contained v0.0.2'
|
|
|
|
fi
|
|
|
|
|
|
|
|
nvm ls 0.0.2 | grep 'v0.0.20' > /dev/null
|
|
|
|
if [ $? -eq 0 ]; then
|
|
|
|
die '"nvm ls 0.0.2" contained v0.0.20'
|
|
|
|
fi
|