Adding a failing test.
parent
c49cb68575
commit
802f064178
|
@ -2,11 +2,40 @@
|
|||
|
||||
mkdir ../../../v0.1.3
|
||||
mkdir ../../../v0.2.3
|
||||
mkdir ../../../v0.20.3
|
||||
|
||||
. ../../../nvm.sh
|
||||
|
||||
die () { echo $@ ; exit 1; }
|
||||
|
||||
# The result should contain only the appropriate version numbers.
|
||||
nvm ls 0.2 | grep v0.2.3 &&
|
||||
nvm ls 0.1 | grep -v v0.2.3 &&
|
||||
nvm ls 0.1 | grep v0.1.3 &&
|
||||
nvm ls v0.2 | grep v0.2.3
|
||||
|
||||
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
|
||||
|
|
Loading…
Reference in New Issue