mirror of
https://github.com/nvm-sh/nvm.git
synced 2025-09-10 08:39:07 +00:00
@@ -0,0 +1,20 @@
|
||||
#!/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 | grep "$NVM_DIR/v0.0.2/bin" > /dev/null
|
||||
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" > /dev/null
|
||||
if [ $? -ne 0 ]; then
|
||||
die '"nvm which 0.0.2" did not contain the correct path'
|
||||
fi
|
@@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
. ../../../nvm.sh
|
||||
|
||||
nvm which nonexistent_version
|
||||
[ "$?" = "1" ]
|
2
test/fast/Listing paths/teardown
Executable file
2
test/fast/Listing paths/teardown
Executable file
@@ -0,0 +1,2 @@
|
||||
rmdir ../../../v0.0.2 >/dev/null 2>&1
|
||||
rmdir ../../../v0.0.20 >/dev/null 2>&1
|
Reference in New Issue
Block a user